Guest User

Untitled

a guest
Jun 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1.  
  2. /*
  3. To avoid polluting the global namespace this uses an anonymous
  4. function which is called with either the URL for an external
  5. JavaScript file or a function. In either case jQuery will be loaded
  6. from the Google CDN before your code is executed so it's free to
  7. depend on jQuery without checking for it and can do things like
  8. jQuery.getScript() to load other components (e.g. jQuery UI),
  9. stylesheets, etc.
  10. */
  11. (function (target, msg) {
  12. var loader = function() {
  13. // Avoid executing this function twice:
  14. if (arguments.callee._executed) return;
  15. arguments.callee._executed = true;
  16.  
  17. bidichecker.runGui(bidichecker.checkPage(document.dir == "rtl"));
  18. };
  19.  
  20. var s = document.createElement('script');
  21. s.type = "text/javascript";
  22. s.setAttribute('src', "//bidichecker.googlecode.com/svn/trunk/lib/bidichecker_packaged.js");
  23.  
  24. if (s.addEventListener) { // Mozilla / WebKit
  25. s.addEventListener("load", loader, false);
  26. } else if ("onreadystatechange" in s) { // IE
  27. s.onreadystatechange = function () {
  28. if (this.readyState == 'complete' || this.readyState == 'loaded') { loader(); }
  29. };
  30. } else {
  31. // Chances are if your browser is this old this won't even work but just in case:
  32. window.setTimeout(loader(), 2500);
  33. }
  34.  
  35. document.getElementsByTagName('head')[0].appendChild(s);
  36. })();
Add Comment
Please, Sign In to add comment