User:PedroM/global.js

function work(href) { var anchor = ""; if (href.indexOf("#") != -1) {     href = href.split("#"); anchor = "#" + href[1]; href = href[0]; }   if (href.indexOf("?") != -1) return href + "&useskin=monobook&handheld=yes" + anchor; else return href + "?useskin=monobook&handheld=yes" + anchor; } $(function run{ if(navigator.userAgent.indexOf("3DS") != -1){    if(window.location.href.indexOf("useskin=monobook") == -1)      window.location = work(window.location.href);    $("a[href^='/'],a[href*='.wikia.com/']").each(function{ $(this).attr("href", work($(this).attr("href"))); }); } });