Thanks for using our site!

If you're looking to become an editor, please read the Becoming an Editor section carefully.

MediaWiki:Common.js: Difference between revisions

From ranchstory
Jump to navigationJump to search
imported>Stephen64
Undo revision 36702 by Stephen64 (talk)
imported>Stephen64
No edit summary
Line 3: Line 3:
mw.loader.load( '/w/index.php?title=MediaWiki:DiscordWidget.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=MediaWiki:DiscordWidget.js&action=raw&ctype=text/javascript' );
/* Loads the JS Required for a Twitter Widget */
/* Loads the JS Required for a Twitter Widget */
mw.loader.load('https://platform.twitter.com/widgets.js&action=raw&ctype=text/javascript');
window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);
 
  t._e = [];
  t.ready = function(f) {
    t._e.push(f);
  };
 
  return t;
}(document, "script", "twitter-wjs"));
/* Loads the JS Required fro the Twitter Widget */
/* Loads the JS Required fro the Twitter Widget */
mw.loader.load( '/w/index.php?title=MediaWiki:TwitterWidget.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=MediaWiki:TwitterWidget.js&action=raw&ctype=text/javascript' );

Revision as of 23:54, 6 January 2021

/* Any JavaScript here will be loaded for all users on every page load. */
/* Loads the JS Required fro the Discord Widget */
mw.loader.load( '/w/index.php?title=MediaWiki:DiscordWidget.js&action=raw&ctype=text/javascript' );
/* Loads the JS Required for a Twitter Widget */
window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);

  t._e = [];
  t.ready = function(f) {
    t._e.push(f);
  };

  return t;
}(document, "script", "twitter-wjs"));
/* Loads the JS Required fro the Twitter Widget */
mw.loader.load( '/w/index.php?title=MediaWiki:TwitterWidget.js&action=raw&ctype=text/javascript' );