מדיה ויקי:Gadget-rollBackSummary.js: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 8: | שורה 8: | ||
var rx = new RegExp('id="file"><a href="([^"]*)"><img alt="[^"]*" src="\1"', 'g'); | var rx = new RegExp('id="file"><a href="([^"]*)"><img alt="[^"]*" src="\1"', 'g'); | ||
var m = rx.exec(text); | var m = rx.exec(text); | ||
slideshowimage.parentNode.parentNode.innerText = text; | //slideshowimage.parentNode.parentNode.innerText = text; | ||
if (!m) return; | if (!m) return; | ||
alert(m[0]); | //alert(m[0]); | ||
slideshowimage.setAttribute('src', m[0]); | slideshowimage.setAttribute('src', m[0]); | ||
slideshowimage.setAttribute('alt', slideShowLinks[currentImage].title); | slideshowimage.setAttribute('alt', slideShowLinks[currentImage].title); | ||
| שורה 38: | שורה 38: | ||
// load image page | // load image page | ||
var a = sajax_init_object(); | var a = sajax_init_object(); | ||
alert(wgServer + wgScriptPath + '/index.php?title=' + encodeURIComponent(slideShowLinks[currentImage]) + '&action=raw'); | alert(wgServer + wgScriptPath + '/index.php?title=' + encodeURIComponent(slideShowLinks[currentImage].title) + '&action=raw'); | ||
a.open('GET', wgServer + wgScriptPath + '/index.php?title=' + encodeURIComponent(slideShowLinks[currentImage]) + '&action=raw', true); | a.open('GET', wgServer + wgScriptPath + '/index.php?title=' + encodeURIComponent(slideShowLinks[currentImage].title) + '&action=raw', true); | ||
a.onreadystatechange = function() { | a.onreadystatechange = function() { | ||
if (a.readyState != 4) return; | if (a.readyState != 4) return; | ||