Created
August 9, 2008 12:29
-
-
Save azu/4675 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 Volumedown for niconico | |
// @namespace http://web.zgo.jp/ | |
// @include http://www.nicovideo.jp/watch/* | |
// ==/UserScript== | |
var VOLUME = 80;//ボリューム | |
var MUTE = 0;//ミュート時のボリューム | |
var w = (typeof unsafeWindow != 'undefined') ? unsafeWindow : window; | |
var deleted = w.so.variables.deleted; | |
//GM_log(deleted); | |
var NGtag = "\u97F3\u91CF\u6CE8\u610F", | |
tags = document.evaluate("//meta[@name='keywords']", document, null, 9, null).singleNodeValue.content, | |
flvplayer = w.$("flvplayer"); | |
(tags.split(",").some(function (tag){ return (tag == NGtag); }) && flvplayer || deleted != 0) | |
? (function (){ | |
var Inter = setInterval(function (){ | |
flvplayer.ext_setVolume(MUTE); | |
if(flvplayer.ext_getVolume() == MUTE)clearInterval(Inter); | |
}, 100); | |
})() | |
: (function (){ | |
var Inter = setInterval(function (){ | |
flvplayer.ext_setVolume(VOLUME); | |
if(flvplayer.ext_getVolume() == VOLUME)clearInterval(Inter); | |
}, 100); | |
})(); | |
//.user.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment