Created
November 5, 2015 02:01
-
-
Save YSRKEN/d924382d2a36b50bd45a to your computer and use it in GitHub Desktop.
君にもできる!ブックマークレット制作講座 ref: http://qiita.com/YSRKEN/items/162c82d081387c4d4603
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
javascript : (function (){ | |
var url = location.href; | |
var pos_id = url.indexOf('im'); | |
var id = url.substring(pos_id + 2, url.length); | |
location.href = 'http://seiga.nicovideo.jp/image/source/' + id; | |
var image_url = location.href; | |
image_url = image_url.replace('/o/', '/priv/'); | |
location.href = image_url; | |
})(); |
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
// 展開時 | |
javascript : (function (){ | |
var str = document.getElementsByTagName('body')[0].innerHTML; | |
var posX = str.indexOf('他のイラスト<'); | |
var posY = str.indexOf('>もっと見る<'); | |
var posA = str.indexOf('/seiga/', posX); | |
var posB = str.indexOf('\"', posA + 7); | |
while ((posA !=- 1) && (posA < posY)){ | |
url = 'http://seiga.nicovideo.jp/seiga/' + str.substring(posA + 7, posB); | |
window.open(url); | |
posA = str.indexOf('/seiga/', posB + 1); | |
posB = str.indexOf('\"', posA + 7); | |
} | |
})(); | |
// 圧縮時 | |
javascript:(function(){var str=document.getElementsByTagName('body')[0].innerHTML;var posX=str.indexOf('他のイラスト<');var posY=str.indexOf('>もっと見る<');var posA=str.indexOf('/seiga/',posX);var posB=str.indexOf('\"',posA+7);while((posA!=-1)&&(posA<posY)){url='http://seiga.nicovideo.jp/seiga/'+str.substring(posA+7,posB);window.open(url);posA=str.indexOf('/seiga/',posB+1);posB=str.indexOf('\"',posA+7)}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment