Open riweckr opened 11 years ago
i've come up with a semi-solution. Add this piece to wiki-embed-overlay.js $('.thumbimage').attr('src', 'URL' + $('.thumbimage').attr('src'));
change URL to your wiki, the rest of the link will append. For example: $('.thumbimage').attr('src', 'http://my.wiki.org/' + $('.thumbimage').attr('src'));
I've made further improvement to this. I discovered later that images shown in a gallery also uses relative urls, but they don't have any id or class defined. Therefore i've come up with this "solution":
//if any image is found, add imagegally class, else show alert
var addToImage = $('img');
addToImage.addClass(function() {
if (addToImage.width()) {
addToImage.addClass( "imagegallery" );
}
else {
alert('something went wrong');
}
});
//Adds a ID tag with a number based on the number of images found in .imagegallery.
$(".imagegallery").each(function(i) {
$(this).attr('id', "image" + (i + 1));
});
//change the url to your destination
var url = "http://wiki.mywiki.org";
$("li").each(function(i) {
$('#image' + (i+1)).attr('src', url + $('#image' + (i+1)).attr('src'));
});
Hi,
the url in scr is incomplete: src="/wiki/images/thumb/..." should be src="http://my.wiki.org/wiki/images/thumb/..."