Steam Game Guides Navigation Tweak

Converts onclick javascript into a big nasty <a> element. Not HTML4 valid, but browsers understand it fine.

Versión del día 16/1/2016. Echa un vistazo a la versión más reciente.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

You will need to install an extension such as Tampermonkey to install this script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name        Steam Game Guides Navigation Tweak
// @description Converts onclick javascript into a big nasty <a> element. Not HTML4 valid, but browsers understand it fine.
// @license     GPLv3
// @namespace   StupidWeasel/SteamCommunity/SteamGameGuidesNavigationTweak
// @include     /^https?://steamcommunity\.com/app/.*/guides/.*$/
// @version     1.00
// @grant       none
// ==/UserScript==

/*
    Steam Game Guides Navigation Tweak - A GreaseMonkey script for easier gameguide navigation
    Copyright (C) 2016 Alex "StupidWeasel" Bolton

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
var guides = document.getElementsByClassName('workshopItemCollectionContainer');
for(var i=0;i<guides.length;i++){
    var thisGuide = guides[i].childNodes[1];
    var oldMarkup = thisGuide.innerHTML;
    if (thisGuide.getAttribute("onclick")){ // If the markup changes or if the script has already run, we dont want to break things.
      var thisonclick = thisGuide.getAttribute("onclick")
      thisGuide.innerHTML = '<a href="' + thisonclick.slice(19,thisonclick.length-1) + '" />' + oldMarkup + '</a>';
      thisGuide.removeAttribute("onclick")
    }
}