@@ -1,5 +1,5 @@
/*
- * @title DQX 思い出アルバム保存補助ブックマークレットv4.3a改 Firefox+dTa専用 by fashi2(tengetsu)
+ * @title DQX 思い出アルバム保存補助ブックマークレットv4.3a改 Firefox+dTa専用 by fashi2(→tengetsu)
* @description my bookmarklet
* @include http://*
* @license MIT License
@@ -105,8 +105,9 @@
}
}
var f=n+dt[0].replace('/','').replace('/','').replace(':','').replace(' ','_')+' '+dt[1]+' ('+p[5]+')'+lck+cp;
+ var p5=p[5];
var urlt='http://img.dqx.jp/smpicture/download/webpicture/'+p[3]+'/thum2/'+p[5]+'/';
- var url='http://img.dqx.jp/smpicture/download/webpicture/'+p[3]+'/original/'+p[5]+'/?dl';
+ var url='http://img.dqx.jp/smpicture/download/webpicture/'+p[3]+'/original/'+p5+'/?dl';
//url+=';'+encodeURIComponent(f)+'.jpg';
var dl=document.createElement('a');
dl.innerHTML = f;
/*
* @title DQX 思い出アルバム保存補助ブックマークレットv4.3a改 Firefox+dTa専用 by fashi2(→tengetsu)
* @description my bookmarklet
* @include http://*
* @license MIT License
* @require
*/
//
// title DQX 思い出アルバム保存補助ブックマークレットv4.3a Firefox+dTa専用 by fashi2
// description DQ10 冒険者の広場 思い出アルバム(画像が9個並んでるとこ)でブックマークレットを実行してファイル名付きリンク生成 →DownThemAll!でフィルターを original に、命名規則を *text*.*ext* に変えてから保存。 / 説明とか http://vp.star-wind.info/dqx/
// include http://hiroba.dqx.jp/sc/character/*/picture/
// license MIT License
// require
//
(function(){
//ライブカメラ
var ts=document.getElementById('timestamp');
if (ts) {
var lp=document.getElementById('imgLivePicLarge'),
pl=document.getElementById('pictplace');
var pli=pl.innerHTML,
tsi=ts.innerHTML,
lps=lp.src;
var fn='DQXLivePic '+tsi.replace('/','').replace('/','').replace(':','').replace(':','').replace(' ','_')+' '+pli.replace(/[0-9()]/g, function(s) { return String.fromCharCode(s.charCodeAt(0) - 65248);}).replace(' ',' ').replace(/[\x0D\x0A\x09]+/g,'');
var br=document.createElement('br');
var ldl=document.createElement('a');
ldl.innerHTML = fn;
ldl.href = lps;
ldl.download = fn+'.jpg';
pl.appendChild(br);
pl.appendChild(ldl);
return true;
}
//イベント画像
var ep=document.getElementById('eventPicLarge');
if (ep) {
var tt = document.getElementById('title');
if (tt) {
var epl=document.getElementById('imgEventPicLarge'),
cn=document.getElementById('charaname');
var tti=tt.innerHTML,
cni=cn.innerHTML
eps=epl.src;
var fn='DQXEventPic ['+cni+'] '+tti;
var br=document.createElement('br');
var ldl=document.createElement('a');
ldl.innerHTML = fn;
ldl.download = fn+'.jpg';
ldl.href = eps;
tt.appendChild(br);
tt.appendChild(ldl);
return true;
}
}
//アルバム詳細
var pd=document.getElementById('pictureDetail');
if (pd) {
var m=document.getElementById('myCharacterName').innerHTML+' ',
pdl=document.getElementById('pictureDetailImage'),
pdtd=document.getElementById('pictureDetailLocationAndDate'),
pdcd=document.getElementById('pictureDetailComment'),
pdc='';
if (pdcd) {
pdc = pdcd.innerHTML;
}
var pdt = pdtd.innerHTML.split('<br>');
var pddt = pdt[0].replace('/','').replace('/','').replace(':','').replace(' ','_');
var pdtt = pdt[1].replace(/[a-zA-Z0-9()]/g, function(s) { return String.fromCharCode(s.charCodeAt(0) - 65248);}).replace(/ /g,' ').replace(/<.+/g, "").replace(/[\x0D\x0A\x09]+/g,'');
var p=pdl.src.split("/");
var pdfn=m+pddt+' '+pdtt+' ('+p[8]+')'+pdc;
var pdurl=pdl.src+'?dl';
var br=document.createElement('br');
var pdl=document.createElement('a');
pdl.innerHTML = pdfn;
pdl.download = pdfn+'.jpg';
pdl.href = pdurl;
pdtd.appendChild(br);
pdtd.appendChild(pdl);
return true;
}
//思い出アルバム
var g=document.getElementById('cttTitle'),
m=document.getElementById('myCharacterName'),
l=document.getElementsByTagName('td');
var n=m.innerHTML+' ', e='';
for(i=0;i<l.length;i++) {
var j=l.length-i-1,k=0,cp='',lck='';
if(!l[j].className.indexOf('contentsTable1TD1')) {
var b=l[j].getElementsByTagName('a');
var p=b[0].rel.split("/");
var c=b[0].title;
if(c)cp=' '+c;
var t=l[j].getElementsByTagName('p');
var dt=t[0].innerHTML.split('<br>');
var lc=l[j].getElementsByTagName('div');
for(k=0;k<lc.length;k++) {
if(!lc[k].className.indexOf('lockIcon')) {
lck='!';
}
}
var f=n+dt[0].replace('/','').replace('/','').replace(':','').replace(' ','_')+' '+dt[1]+' ('+p[5]+')'+lck+cp;
var p5=p[5];
var urlt='http://img.dqx.jp/smpicture/download/webpicture/'+p[3]+'/thum2/'+p[5]+'/';
var url='http://img.dqx.jp/smpicture/download/webpicture/'+p[3]+'/original/'+p5+'/?dl';
//url+=';'+encodeURIComponent(f)+'.jpg';
var dl=document.createElement('a');
dl.innerHTML = f;
dl.download = f+'.jpg';
dl.href = url;
l[j].appendChild(dl);
}
}
//冒険日誌
var g=document.getElementById('cttTitle'),
m=document.getElementById('myCharacterName'),
l=document.getElementsByTagName('div');
var n=m.innerHTML+' ', e='';
for(i=0;i<l.length;i++) {
var j=l.length-i-1,k=0,cp='',b=0;
if(!l[j].className.indexOf('article')) {
var lp=l[j].getElementsByTagName('p');
for(li=0;li<lp.length;li++) {
var lj=lp.length-li-1;
if (!lp[lj].className.indexOf('pict_img')) {
var b=lp[lj].getElementsByTagName('a');
if (b[0]) {
var p=b[0].rel.split("/");
var c=b[0].title;
if(c)cp=' '+c;
}
}
if (!lp[lj].className.indexOf('txt_logDate')){
var dt=lp[lj].innerHTML;
}
if (!lp[lj].className.indexOf('log_title')){
var tt=lp[lj].innerHTML.replace('撮影場所','').replace(/[a-zA-Z0-9()]/g, function(s) { return String.fromCharCode(s.charCodeAt(0) - 65248);}).replace(/ /g,' ').replace(/<.+/g, "").replace(/[\x0D\x0A\x09]+/g,'');
}
}
if (b[0]) {
var f=n+dt.replace('/','').replace('/','').replace(':','').replace(' ','_')+' '+tt+' ('+p[5]+')'+cp;
var url='http://img.dqx.jp/smpicture/download/webpicture/'+p[3]+'/original/'+p[5]+'/?dl';
var dl=document.createElement('a');
dl.innerHTML = f;
dl.download = f+'.jpg';
dl.href = url;
l[j].appendChild(dl);
}
}
}
})();