Last active
January 10, 2019 00:56
-
-
Save Arefu/5c2fd70a47a4ad677d4b0f056fa0aeea to your computer and use it in GitHub Desktop.
A UserScript that lets you download from CoolRoms.com faster then waiting the 100 seconds.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Portal Roms Instant Downloader | |
// @version 1 | |
// @grant none | |
// @description No Wait Times For Portal Roms. | |
// @include http://www.portalroms.com/* | |
// ==/UserScript== | |
//This was only tested on the PS2 page, it should work on the other pages assuming they follow the same scheme. | |
var DownloadLink = "http://www.portalroms.com/torrents/" | |
var ConsoleNameClass = document.getElementsByClassName("field field-name-field-plataforma field-type-taxonomy-term-reference field-label-inline clearfix")[0].innerText; | |
var ConsoleName = ConsoleNameClass.replace("System:", "").trim().toLowerCase().replace(/ /g,''); | |
var GameNameClass = document.getElementsByClassName("field field-name-field-release field-type-text field-label-inline clearfix")[0].innerText; | |
var GameName = GameNameClass.replace("Release:", "").trim(); | |
DownloadLink = DownloadLink+ConsoleName+"/"+GameName+".torrent"; | |
document.getElementsByClassName("field field-name-field-link-para-download field-type-link-field field-label-inline clearfix")[0].innerHTML = "<div class=\"field-label\">Download link: </div><div class=\"field-items\"><div class=\"field-item even\"><a href="+encodeURI(DownloadLink)+" title=\"DOWNLOAD!\">DOWNLOAD! (USA)</a></div></div>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to Chris for helping out with the URL escape stuff to get the download link to work.