|
Thanks for using our site! |
MediaWiki:Common.js: Difference between revisions
From ranchstory
Jump to navigationJump to search
imported>Stephen64 No edit summary |
imported>Stephen64 No edit summary |
||
| Line 2: | Line 2: | ||
/* Loads the JS Required fro the Discord Widget */ | /* Loads the JS Required fro the Discord Widget */ | ||
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 */ | ||
window.twttr = (function(d, s, id) { | // window.twttr = (function(d, s, id) { | ||
var js, fjs = d.getElementsByTagName(s)[0], | // var js, fjs = d.getElementsByTagName(s)[0], | ||
t = window.twttr || {}; | // t = window.twttr || {}; | ||
if (d.getElementById(id)) return t; | // if (d.getElementById(id)) return t; | ||
js = d.createElement(s); | // js = d.createElement(s); | ||
js.id = id; | // js.id = id; | ||
js.src = "https://platform.twitter.com/widgets.js"; | // js.src = "https://platform.twitter.com/widgets.js"; | ||
fjs.parentNode.insertBefore(js, fjs); | // fjs.parentNode.insertBefore(js, fjs); | ||
t._e = []; | // t._e = []; | ||
t.ready = function(f) { | // t.ready = function(f) { | ||
t._e.push(f); | // t._e.push(f); | ||
}; | // }; | ||
return t; | // return t; | ||
}(document, "script", "twitter-wjs")); | // }(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:01, 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' );