Last active
August 2, 2022 23:45
-
-
Save G33kDude/d3d9e4fd7c739dab3527 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 Code box to CodeQuickTester | |
// @namespace https://github.com/G33kDude | |
// @version 0.6 | |
// @description Adds a button to open AHKScript code boxes in CodeQuickTester | |
// @author GeekDude | |
// @match *://autohotkey.com/boards/viewtopic.php* | |
// @grant none | |
// @updateURL https://gist.github.com/G33kDude/d3d9e4fd7c739dab3527/raw/CodeBox2QuickTest.user.js | |
// ==/UserScript== | |
$(".codebox_plus > p > a:contains('Download')").each(function(i, e) { | |
$(e).after( | |
" ", | |
$("<a>[Open]</a>").attr("href", "ahk:" + e.href) | |
); | |
}); | |
$(".post_gist_toggle").after( | |
" ", | |
$("<input type='button' value='Open' />") | |
.attr("style", $(".post_gist_toggle").attr("style")) | |
.on("click", function (){ | |
window.location = "ahk:" + $(this).next().find("a").attr("href"); | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I'm trying to get this to work again.
I've got the [Open] button to reappear by prepending
www.
on L7's URL and changing L12 to:Right now, CodeQuickTester opens up filled with the page html.
I'm not entirely sure how to pass in the codebox content.
I find this tool very useful and would like to have that extra convenience.
Any plans on tweaking the code a bit?