Main page
Namespaces
Views
// ***************************** Structure *****************************
// Remove unnecessary elements
$("div#p-tb").remove();
// Wrap the content
$("div#content, div#mw-navigation").wrapAll("// Insert the header
$("- <a itemprop='url' href='https://www.facebook.com/Grinderscape.org'></a>
- <a itemprop='url' href='https://www.youtube.com/user/dokenfilm/feed'></a>
- <a itemprop='url' href='https://discord.gg/b46xx5u'></a>
- <a href='/Special:UserLogin' data-toggle='modal' data-target='#myModal-user'>Wiki Login</a>
- <a itemprop='url' href='https://www.grinderscape.org'>HOME</a>
- <a itemprop='url' href='http://forum.grinderscape.org/'>FORUM</a>
- <a itemprop='url' href='https://www.grinderscape.org/store'>STORE</a>
- <a itemprop='url' href='https://www.grinderscape.org/download'>DOWNLOAD</a>
- <a href='javascript:void(0);' data-toggle='modal' data-target='#myModal-vote'>VOTE</a>
- <a itemprop='url' href='https://www.grinderscape.org/highscores'>HIGHSCORES</a>
- <a itemprop='url' href='http://wiki.grinderscape.org/'>WIKI</a>
- <a itemprop='url' href='https://www.grinderscape.org/contact'>CONTACT</a>
// Organize the elements
// if(window.matchMedia("(max-width: 1024px)").matches){ // // The viewport is less than 1024 pixels wide // console.log("This is a mobile device."); // $("div#mw-navigation").appendTo(".main-nav"); // } else{ // // The viewport is at least 1024 pixels wide // console.log("This is a tablet or desktop."); // $("div#mw-navigation").insertBefore(".login"); // }
$("div#content").wrap("<section class='main-content-cstm'></section>"); $("div#mw-navigation").insertBefore(".main-content-cstm");
$("div#content").wrap("");$("div#mw-panel").insertAfter("div#content");
$("div#content").wrap(""); $("Namespaces
Views
$("div#left-navigation").appendTo("div#navigation"); $("div#right-navigation").appendTo("div#navigation");
$("Main page
$("ul#footer-info").insertAfter("div#content");
// Insert the footer
$("<footer>ABOUT
GrinderScape has been a dedicated server since 2008, with helpful staff and dedicated members. If you need help in how to start, you can see the Wiki. If you wish to get involved with the community as a whole, join our Forums, for the latest threads and game suggestions.
GENERAL
- <a itemprop='url' href='https://www.grinderscape.org/download'>Play Now</a>
- <a itemprop='url' href='https://www.grinderscape.org/contact' target='_blank'>Contact Us</a>
- <a itemprop='url' href='https://www.grinderscape.org/tos' target='_blank'>Terms of Services</a>
- <a itemprop='url' href='https://www.grinderscape.org/user/manage' target='_blank'>Account Management</a>
- <a itemprop='url' href='https://www.grinderscape.org/faq' target='_blank'>Frequently Asked Questions</a>
GUIDES
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/topic/132-in-game-drops-guide-mystery-boxes/' target='_blank'>NPC Drops Guide</a>
- <a itemprop='url' href='https://wiki.grinderscape.org/Main_page/Guides/Skill_guides/Slayer' target='_blank'>Slayer Guide</a>
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/topic/132-in-game-drops-guide-mystery-boxes/' target='_blank'>Drops Guide</a>
- <a itemprop='url' href='https://wiki.grinderscape.org/Main_page/Guides/Monster_hunting_guides' target='_blank'>Monster Hunting Guides</a>
- <a itemprop='url' href='https://wiki.grinderscape.org/Main_page/Guides/General_guides/Commands' target='_blank'>In-Game Commands </a>
- <a itemprop='url' href='https://wiki.grinderscape.org/Main_page/Guides/Skill_guides' target='_blank'>Skilling Guides</a>
- <a itemprop='url' href='https://wiki.grinderscape.org/Main_page/Guides/General_guides' target='_blank'>General Guides</a>
FORUM THREADS
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/forum/2-news-announcements/' target='_blank'>News & Announcements</a>
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/forum/39-report-in-game-bugs/' target='_blank'>Report In-Game Bugs</a>
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/forum/11-submit-appeal/' target='_blank'>Submit In-Game Appeal</a>
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/forum/59-recover-a-lost-account/' target='_blank'>Recover a Lost Account</a>
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/forum/10-submit-player-report/' target='_blank'>Submit Player Report</a>
- <a itemprop='url' href='https://forum.grinderscape.org/index.php?/forum/5-rules/' target='_blank'>In-Game Rules</a>
GrinderScape is not affiliated with Jagex or Runescape in any way.
// Mobile Navigation Click Function $(".mobile-menu").click(function () {
$(this).toggleClass('open'); $(".main-nav").toggleClass("side-open");
});
// Set up the page footer info
if ($("li#footer-info-credits").length > 0) {
$("li#footer-info-credits").html($("li#footer-info-credits").html().replace(/\[/g, "").replace(/\]/g, "").replace(/\{/g, "").replace(/\}/g, "
"));$("p#contentFooter").insertBefore("li#footer-info-credits"); $("li#footer-info-credits").remove();
}
// Set up the page title and breadcrumb
var title = $("h1#firstHeading").html().split('/'); $("h1#firstHeading").html(title[title.length - 1]); $("h1#firstHeading").appendTo("div#pageInfo");
$("span.subpages").appendTo("div#pageInfo"); $("span.subpages").html($("span.subpages").children()); $("" + title[title.length - 1] + "").appendTo("span.subpages"); $(" / ").insertAfter("span.subpages > a");
// Set up the page title
document.title = title[title.length - 1] + " - GrinderScape Wiki";
// Remove href from selected tabs
$.each($("div.vectorTabs li.selected"), function () {
$(this).find("a").removeAttr("href");
});
// Remove title from links
$("a").removeAttr("title");
// Set up the search box
$("div#p-search").insertBefore(".main-content-cstm"); $("div#p-search").wrap("<section class='main-top-cstm'></section>") $("input#searchInput").val("Search...").removeAttr("placeholder").attr("onfocus", "if (this.value == 'Search...') {this.value = ;}").attr("onblur", "if (this.value == ) {this.value = 'Search...';}");
// Set up the announcement / welcome text
var welcome_text = ; //empty to set at later time $(welcome_text).insertBefore("div#p-search"); // Placement of text
var Homepage = 'https://wiki.grinderscape.org/Main_page'
// if on homepage / not on homepage if (location.href == Homepage) {
// Show normal header/welcome text$("
welcome_text ='This reference guide can help with all your burning GrinderScape questions, from Alchemy to Zamorak. Have fun and get grinding.'; console.log('YOURE ON THE HOMEPAGE');
} else {
//Show different header text on not homepage pages welcome_text = "Can't find what you're looking for? Use the search for extra assistance(?)!"; console.log('Congrats, youre on another page');
} // $("div#siteNotice").insertBefore("div#p-search");
// Set up the edit box
function wrapText(elementID, openTag, closeTag) {
var textArea = $("#" + elementID); var len = textArea.val().length; var start = textArea[0].selectionStart; var end = textArea[0].selectionEnd; var selectedText = textArea.val().substring(start, end); var replacement = openTag + selectedText + closeTag; textArea.val(textArea.val().substring(0, start) + replacement + textArea.val().substring(end, len));
}
$("input#wpWatchthis").prop("checked", false);
$("").appendTo("div#toolbar");$("#CB-Nowiki").click(function () {
wrapText("wpTextbox1", "", "");
});
$("").prependTo("div#toolbar");$("#CB-Heading2").click(function () {
wrapText("wpTextbox1", "", "
");});
$("").prependTo("div#toolbar");$("#CB-Heading1").click(function () {
wrapText("wpTextbox1", "", "
");});
$("").prependTo("div#toolbar");$("#CB-Italic").click(function () {
wrapText("wpTextbox1", "", "");
});
$("").prependTo("div#toolbar");$("#CB-Bold").click(function () {
wrapText("wpTextbox1", "", "");
});
// Remove auto correct from text boxes
$("textarea#wpTextbox1, input#searchInput, input#database_input").attr("spellcheck", "false");
// Table Highlight
$('.highlight tr').mouseover(function () {
$(this).addClass('highlight-hover'); //Add Hover Class to toggle css
}) $('.highlight tr').mouseout(function () {
$(this).removeClass('highlight-hover'); //remove the class when not on hover of .highlight tr
})
// ***************************** Indices *****************************
$.each($("div.timestamp"), function () {
var str = $(this).html(); var year = str.substr(0, 4); var month = str.substr(4, 2); if (month == 01) { month = " January " } else if (month == 02) { month = " February " } else if (month == 03) { month = " March " } else if (month == 04) { month = " April " } else if (month == 05) { month = " May " } else if (month == 06) { month = " June " } else if (month == 07) { month = " July " } else if (month == 08) { month = " August " } else if (month == 09) { month = " September " } else if (month == 10) { month = " October " } else if (month == 11) { month = " November " } else if (month == 12) { month = " December " } var day = str.substr(6, 2); $(this).html("Last modified on " + day + month + year + "."); if (str == "") { $(this).html("This page is under construction."); }
}); $.each($("div.link > a"), function () {
var link = $(this).html().split("/"); $(this).html(link[link.length - 1].replace(/\_/g, " "));
});
// ***************************** Databases *****************************
function commaSeparateNumber(val) {
while (/(\d+)(\d{3})/.test(val.toString())) { val = val.toString().replace(/(\d+)(\d{3})/, '$1' + '.' + '$2'); }; return val;
};
$("button#database_button").click(function () {
searchDatabase();
});
// ***************************** Close *****************************
// Remove the loader
setTimeout(function () {
$("div#mw-head-base").fadeOut(500); $("div#mw-page-base").fadeOut(500);
}, 600);