Last active
December 6, 2015 23:00
-
-
Save mrkmg/6e33f1c672818f30b312 to your computer and use it in GitHub Desktop.
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 New Coffee-Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description shows how to use coffeescript compiler | |
// @author You | |
// @require http://coffeescript.org/extras/coffee-script.js | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @match https://speed.cd/browse.php* | |
// ==/UserScript== | |
/* jshint ignore:start */ | |
var inline_src = (<><![CDATA[ | |
watch_list = [] | |
tick_interval = null | |
startUp = -> | |
onTick = -> | |
refreshResults = -> | |
$('').click() | |
askForWatch = -> | |
answer = prompt("Input a watch string") | |
if answer == "" | |
return | |
watch_list.push answer | |
askForWatch() | |
]]></>).toString(); | |
var compiled = this.CoffeeScript.compile(inline_src); | |
eval(compiled); | |
/* jshint ignore:end */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment