User:WooperIsBest/common.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:Wikimarks/code.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:MorePageActions/code.js',        'u:dev:MediaWiki:RecentChangesMultiple/code.2.js'    ] });

var page = window.location; var cookies = document.cookie; function getCookie(cname) { //https://www.w3schools.com/js/js_cookies.asp var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i <ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); }			if (c.indexOf(name) === 0) { return c.substring(name.length, c.length); }		}		return ""; }   if(mw.config.get('wgIsMainPage') && !page.toString.includes('?redirect=no')){ page.replace('/wiki/' + getCookie('landingpage')); }   if(mw.config.get('wgPageName') == getCookie('landingpage')){ var header = document.getElementsByClassName('page-header__main'); var href = '  Back' while(href.includes('%20')){ href = href.replace(' ', '_'); }	   $(href).appendTo(header); } }(this, this.jQuery, this.mediaWiki));
 * (function (window, $, mw) {

document.cookie = 'landingpage=Hurricane_Bow';