paytpye
by
kuwa
2011-02-08 [2011/02/08 11:24:55]
my bookmarklet
@@ -1,18 +1,23 @@
-/*
- * @title bookmarklet
- * @description my bookmarklet
- * @include http://*
- * @license MIT License
- * @require
- */
-
-
/* 支払い方法絞り込み準備 */
$("th.w_payment","table.table_pricelist").append("<br><div id='paytype'><img src='http://img.coneco.net/icon/key1.gif' border='0'><img src='http://img.coneco.net/icon/key2.gif' border='0'><img src='http://img.coneco.net/icon/key7.gif' border='0'><img src='http://img.coneco.net/icon/key3.gif' border='0'><img src='http://img.coneco.net/icon/key4.gif' border='0'><img src='http://img.coneco.net/icon/key5.gif' border='0'></div>");
+$("img","#paytype").css({"margin-left":"1px","margin-top":"0","margin-right":"2px","margin-bottom":"1px"});
+
/* 支払い方法絞り込み実行 */
$("img","div#paytype").css("cursor","pointer").click(
function(){
+ var imgurl = this.src.replace("_g","");
+ if(imgurl.indexOf("5") >= 0){
+ $("tr.bgR,tr.bgG,tr.bgW","table.table_pricelist").css("display","table-row");
+ $("img","div#paytype").each(
+ function(){
+ if(this.src.indexOf("_g.gif") >= 0){
+ this.src = this.src.replace("_g.gif",".gif");
+ }
+ }
+ );
+ return;
+ }
$("img","div#paytype").each(
function(){
if(this.src.indexOf("_g.gif") < 0){
@@ -20,9 +25,16 @@
}
}
);
- var imgurl = this.src.replace("_g","");
$("tr.bgR,tr.bgG,tr.bgW","table.table_pricelist").css("display","none");
$("img[src='"+imgurl+"']","table.table_pricelist").parent().parent().parent().css("display","table-row");
this.src = imgurl;
}
+).mousedown(
+ function(){
+ $(this).css({"margin-left":"2px","margin-top":"1px","margin-right":"1px","margin-bottom":"0px"});
+ }
+).mouseup(
+ function(){
+ $(this).css({"margin-left":"1px","margin-top":"0","margin-right":"2px","margin-bottom":"1px"});
+ }
);
/* 支払い方法絞り込み準備 */
$("th.w_payment","table.table_pricelist").append("<br><div id='paytype'><img src='http://img.coneco.net/icon/key1.gif' border='0'><img src='http://img.coneco.net/icon/key2.gif' border='0'><img src='http://img.coneco.net/icon/key7.gif' border='0'><img src='http://img.coneco.net/icon/key3.gif' border='0'><img src='http://img.coneco.net/icon/key4.gif' border='0'><img src='http://img.coneco.net/icon/key5.gif' border='0'></div>");
$("img","#paytype").css({"margin-left":"1px","margin-top":"0","margin-right":"2px","margin-bottom":"1px"});
/* 支払い方法絞り込み実行 */
$("img","div#paytype").css("cursor","pointer").click(
function(){
var imgurl = this.src.replace("_g","");
if(imgurl.indexOf("5") >= 0){
$("tr.bgR,tr.bgG,tr.bgW","table.table_pricelist").css("display","table-row");
$("img","div#paytype").each(
function(){
if(this.src.indexOf("_g.gif") >= 0){
this.src = this.src.replace("_g.gif",".gif");
}
}
);
return;
}
$("img","div#paytype").each(
function(){
if(this.src.indexOf("_g.gif") < 0){
this.src = this.src.replace(".gif","_g.gif");
}
}
);
$("tr.bgR,tr.bgG,tr.bgW","table.table_pricelist").css("display","none");
$("img[src='"+imgurl+"']","table.table_pricelist").parent().parent().parent().css("display","table-row");
this.src = imgurl;
}
).mousedown(
function(){
$(this).css({"margin-left":"2px","margin-top":"1px","margin-right":"1px","margin-bottom":"0px"});
}
).mouseup(
function(){
$(this).css({"margin-left":"1px","margin-top":"0","margin-right":"2px","margin-bottom":"1px"});
}
);
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。