Pixivã®☆ã£ã¦、hoverå±æ§ãä¸æã使ã£ã¦ãã®ã§、空éããã²ã¼ã·ã§ã³ã使ããªãã£!!
ã£ã¦äºã§、UserScriptæ¸ãã。(æ¸ããª)
以ä¸ãã³ããããã ãã§ãï½ã ã!
ãã¡ãã、Opera10ã§ãã確èªãã¦ã¾ãã(ç¬)
å¤å、Firefoxã¨ãChromeã§ãåãã¨æã。
å¤å……。
ãã¡ãã§ãå ¬éãã¦ã¾ã。
http://userscripts.org/scripts/show/59567
ãã¼èª¬æ
è©ä¾¡ã¢ãã … 'l'ãã¼
è©ä¾¡ãã¦ã³ … 'h'ãã¼
æ±ºå® … ã¨ã³ã¿ã¼ãã¼
å§æ¯ãªæ段ã§ã¨ã³ã¿ã¼ãã¼ãå¤å®ãã¦ã¾ã。詳細ã¯ã³ã¼ããåç §ãã ããï½
ã£ã¦äºã§、UserScriptæ¸ãã。(æ¸ããª)
以ä¸ãã³ããããã ãã§ãï½ã ã!
ãã¡ãã、Opera10ã§ãã確èªãã¦ã¾ãã(ç¬)
å¤å、Firefoxã¨ãChromeã§ãåãã¨æã。
å¤å……。
ãã¡ãã§ãå ¬éãã¦ã¾ã。
http://userscripts.org/scripts/show/59567
ãã¼èª¬æ
è©ä¾¡ã¢ãã … 'l'ãã¼
è©ä¾¡ãã¦ã³ … 'h'ãã¼
æ±ºå® … ã¨ã³ã¿ã¼ãã¼
å§æ¯ãªæ段ã§ã¨ã³ã¿ã¼ãã¼ãå¤å®ãã¦ã¾ã。詳細ã¯ã³ã¼ããåç §ãã ããï½
// ==UserScript==
// @name pixiv star
// @namespace http://looxu.blogspot.com/
// @include http://www.pixiv.net/member_illust*
// @author Arc Cosine
// @version 1.0
// ==/UserScript==
// License Public Domain
(function(){
var PIXIV = {
hover_size : 30,
my_rate : 0,
init : function(){
window.addEventListener( 'keypress', function(e){
PIXIV.addKeyBind( 'h', function(){ PIXIV.rateChange(-1); }, e);
PIXIV.addKeyBind( 'l', function(){ PIXIV.rateChange(1);}, e);
PIXIV.addKeyBind( 'Enter', function(){ PIXIV.rateSend();}, e);
},false );
},
addKeyBind : function( keyChar, func, eve ){
var t=eve.target;
var n=t.tagName.toLowerCase();
if( t.nodeType != 1 || n == 'input' || n == 'textarea' ){
return;
}
var pressKey = eve.which;
keyChar = (keyChar=='Enter') ? 13 : keyChar.charCodeAt(keyChar);
if( pressKey == keyChar ){
eve.preventDefault(); //Stop Default Event
func.apply();
}
},
rateChange : function(num){
PIXIV['my_rate'] += num;
if( PIXIV['my_rate'] < 0 ) { PIXIV['my_rate'] = 0 };
if( PIXIV['my_rate'] > 10 ) { PIXIV['my_rate'] = 10 };
var chk = document.getElementsByClassName('r1-unit')[0];
if( chk.tagName.toLowerCase() == 'li' ){
return;
}
for( var i=1; i<11; i++ ){ //It's bad roop code ...;-)
var rate_star = document.getElementsByClassName('r'+i+'-unit')[0];
rate_star.style.width = (PIXIV['hover_size'] * i) + 'px';
if( i <= PIXIV['my_rate'] ){
rate_star.style.background = "url('http://source.pixiv.net/source/images/star_rating.gif') left center";
rate_star.style.zIndex = 2;
rate_star.style.left = '0px';
}else{
rate_star.style.background = "url('http://source.pixiv.net/source/images/star_rating.gif') left top";
rate_star.style.zIndex = 1;
rate_star.style.height = '30px';
}
}
},
rateSend : function(){
var w = (typeof unsafeWindow != 'undefined' ) ? unsafeWindow : window;
w.send_rating(PIXIV['my_rate']); //pixiv api
}
}
PIXIV.init();
})();
ã³ã¡ã³ã
ã³ã¡ã³ããæ稿