Skip to content

Instantly share code, notes, and snippets.

@blueberrystream
Created April 7, 2015 16:13
Show Gist options
  • Save blueberrystream/7ce288c192fd4650ca38 to your computer and use it in GitHub Desktop.
Save blueberrystream/7ce288c192fd4650ca38 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name [x-arthur.gree-pf.net] play back ground music
// @namespace http://kid0725.usamimi.info
// @version 1.0
// @author KID the Euforia a.k.a. blueberrystream
// @description play kakusan-sei million arthur's bgm
// @homepage https://github.com/blueberrystream/userscripts/
// @match http://x-arthur.gree-pf.net/*
// @grant none
// @require http://code.jquery.com/jquery-2.1.3.min.js
// @copyright 2015+, KID the Euforia a.k.a. blueberrystream
// @license MIT License
// ==/UserScript==
void(function() {
var V = 0.2,
B = '',
a = document.createElement('audio'),
k = null,
p = location.pathname,
m = {
'/mypage': '05.mp3',
'/ability': '05.mp3',
'/help': '05.mp3',
'/present': '14.mp3',
'/quest/boss': '06.mp3',
'/quest': '03.mp3',
'/raid': '12.mp3',
'/arena': '21.mp3',
'/guild': '14.mp3',
};
for (k in m) {
if (p.indexOf(k) === 0) {
a.src = B + m[k];
a.volume = V;
a.preload = true;
$(a).appendTo('body').get(0).play();
break;
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment