Using RequireJS in a bookmarket

I created a bookmarklet using require js, this is normal on all sites except those that already use requirejs. I searched in the documentation, I do not find "no conflict mode", for example, jquery or something to control multiple versions. Any idea?

Thank.

+5
source share
1 answer

Before you include the script, check to see if the require object is specified. include only the script if the object is undefined

if(typeof require != 'undefined') {
   //include script
}
0
source

All Articles