/* SCP-Wiki SCP Series dead links checker version 1.1 2015-07-27 Copyright (c) 2013-2015 Crayne -------------------------------------------------------------------- This is a Greasemonkey user script. To install, you need Greasemonkey: http://greasemonkey.mozdev.org/ Then restart Firefox and revisit this script. Under Tools, there will be a new menu item to "Install User Script". Accept the default configuration and install. To uninstall, go to Tools/Manage User Scripts, select "SCP-Wiki SCP Series dead links checker", and click Uninstall. -------------------------------------------------------------------- */ // ==UserScript== // @name SCP-KO Wiki SCP Series dead links checker // @description Script that adds small embellishments to the experience // @include http://ko.scp-wiki.net/scp-series-ko // @include http://ko.scp-wiki.net/scp-series* // ==/UserScript== /* * Removes all whitespace from the beginning and the end of a string * * Usage: myString.trim() * Returns: string, the string the function is applied to, stripped of all whitespace at the beginning and end. */ String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, ""); } var myAccount = document.getElementById('my-account'); if (myAccount) { var links = document.getElementsByTagName('a'); var wrongTitles = new Array(); var noTitles = new Array(); var output; for (var x = 0; x < links.length; x++) { if (links[x].className == "newpage") { if (links[x].parentNode.innerHTML.indexOf('[접근 거부]') == -1) { wrongTitles.push(links[x].innerHTML); } } } if (wrongTitles.length > 0) { output = "
" + wrongTitles.join('
');
output += "