Blip.fmを快適に利用するためのユーザスクリプト
Windows環境のFirefoxで発生するFlashのwmode問題をBlip.fmを例に取り解決方法を模索するにあったけど、個別のエントリーに分けてみた。
ソースコード
// ==UserScript== // @name blip.fm script // @namespace http://d.hatena.ne.jp/Cherenkov/ // @include http://blip.fm/* // @version 0.0.1 // @description Fixed the Flash wmode problem with Windows user. Add confirm DJ remove. Without ads, layout modification. // ==/UserScript== GM_addStyle(<><![CDATA[ /* fixed the Flash wmode problem */ #blipPlayer {position:fixed; bottom:0px;} /* layout modification */ #display .bd {width:96%;} #frame {width:820px;} #page {width:820px;} div.col1 {width:480px;} div.col2 {width:328px;} div.col2 .badge {right:123px !important;} #whoami {font-size:88%;} img[src*="images/buttons/header/settings.png"] {height:15px; width:54px;} img[src*="images/buttons/header/logout.png"] {height:16px; width:50px;} button.search {display:none;} #search {width:340px;} #message {width:350px !important;} #help {margin:0 0 10px 0 !important;} #searchResults tbody tr td.songTitle {max-width:234px;} .fuzz-notice {left:50px;} /* without ads */ #slot320x250,#slot728x90 {display:none;} ]]></>); //add confirmAction if(/^http:\/\/blip\.fm\/profile\/.*\/favoritePeople/.test(location.href)) { var x = document.evaluate('//button[@class="x"]', document, null, 7, null); for(var i=0;i<x.snapshotLength;i++){ var func = x.snapshotItem(i).getAttribute("onclick"); x.snapshotItem(i).setAttribute("onclick","confirmAction('Are you sure you want to remove this DJ from your Favorites?', function() {" + func + "})"); } }
- swfの位置を修正。Windowsユーザ重要。理由→Flashのwmode問題
- 再生コントローラのレイアウトなどを修正
- blip.fmのfavorite DJsのページで確認してからdeleteするようにするも加えた。confirmAction関数はBlip.fmのものを利用。
感想
もうちょっと幅を詰めたいけどキビシイ。
英語が分らない。