Last active
July 12, 2018 10:05
-
-
Save AprilSylph/97b3f11eea9ae9d411d966e6865658e0 to your computer and use it in GitHub Desktop.
XKit Extension
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
https://78.media.tumblr.com/tumblr_pb84wkYuTo1rtgc6mo1_1530509782_cover.png |
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
//* TITLE DSiWare **// | |
//* VERSION 1.0.1 **// | |
//* DESCRIPTION Turns the XKit Gallery into the DSi Shop **// | |
//* DEVELOPER AprilSylph **// | |
//* FRAME false **// | |
//* BETA false **// | |
XKit.extensions.dsiware = new Object({ | |
tune: new Audio("https://a.tumblr.com/tumblr_pb84wkYuTo1rtgc6mo1.mp3"), | |
running: false, | |
run: function() { | |
this.running = true; | |
$("#xkit_button").click(function() { | |
$("#xkit-cp-tab-get-extensions:not(.selected)").click(function() { | |
if (!XKit.extensions.dsiware.running) { return; } | |
XKit.extensions.dsiware.tune.play(); | |
$("#xkit-control-panel-tabs > :not(.selected), #xkit-control-panel-shadow").click(XKit.extensions.dsiware.stop); | |
}); | |
$(document).keydown(function(e) { if (e.keyCode == 27) { XKit.extensions.dsiware.stop() } }); | |
}); | |
}, | |
stop: function() { | |
XKit.extensions.dsiware.tune.pause(); | |
XKit.extensions.dsiware.tune.currentTime = 0; | |
}, | |
destroy: function() { | |
this.running = false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment