MediaWiki:Common.js

From The Official GPF Wiki
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Add AddThis button to the sidebar for non-HTTPS pages using short URLs: */
if (window.location.href.match(/^https\:/) && window.location.href.match(/\/wiki\//)) {
	var mwPanelDiv = document.getElementById('mw-panel');
	mwPanelDiv.innerHTML += '<p><a class="addthis_button" href="https://www.addthis.com/bookmark.php?v=300&amp;pubid=jtdarlington"><img src="https://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></p><script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=jtdarlington"></script>';
}

/* Add banner ads, GPF Premium subscription notices, and site-wide notices to
   the top of the page: */
$.getScript('/advertise/lib_ads_js.php', function() {
	var gpftopanchor = document.getElementById('top');
	gpftopanchor.outerHTML += gpfLeaderboardAdString() + gpfSkyscraperAdString();
});