We have case for use mode like

if (after('Drupal.', $contents, FALSE) && (after('$(', $contents)) && !after('(function($)', $contents, FALSE) && !after('var run_through_jquery_compatibility_mode = FALSE;', $contents, FALSE)) {
return TRUE;
}

It means that file must contatins Drupal. and $(.

Suggest to use

if ((after('Drupal.', $contents, FALSE) || after('$(', $contents)) && !after('(function($)', $contents, FALSE) && !after('var run_through_jquery_compatibility_mode = FALSE;', $contents, FALSE)) {
return TRUE;
}

Here is a patch.

Thanks.

CommentFileSizeAuthor
jquery_compatibility.patch944 bytesigor.ro

Comments

igor.ro’s picture

Status: Active » Needs review
crystaldawn’s picture

Status: Needs review » Closed (works as designed)

The reason it requires drupal and $( is because not all files that have $( are drupal jquery files. And since this module is meant only for those that have to deal with drupal, I have required the word drupal to be in it. I couldnt think of any situation where the two would never both be present. What is your use case where only $( was available?