Last active
August 29, 2015 14:03
-
-
Save jmozmoz/166982cf257771699ff4 to your computer and use it in GitHub Desktop.
Userscript to subscribe to threads at www.cfd-online.com/Forums/ with a single click
This file contains hidden or 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 OneClickSubscription | |
// @namespace oneclicksubscription | |
// @description Subscribe to a thread on cfd-online.com with one click | |
// @include http://www.cfd-online.com/Forums/subscription.php?do=addsubscription&t=* | |
// @version 0.0.1 | |
// @grant none | |
// ==/UserScript== | |
function main() { | |
//alert('forms.length: ' + document.forms.length); | |
for (var i = 0; i < document.forms.length; i++) { | |
var action = document.forms[i].action; | |
if (action.indexOf("doaddsubscription") > -1) { | |
window.console.log("found form!"); | |
document.forms[i].submit(); | |
} | |
} | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment