2016-02-09 18:08:20 +01:00
|
|
|
//META{"name":"agif"}*//
|
|
|
|
|
|
|
|
var agif = function () {};
|
|
|
|
|
|
|
|
agif.prototype.convert = function () {
|
2016-03-31 09:15:39 +02:00
|
|
|
$(".image canvas").each(function() {
|
|
|
|
var href = $(this).attr("href");
|
2016-02-09 18:08:20 +01:00
|
|
|
if(href != undefined) {
|
2016-03-31 09:15:39 +02:00
|
|
|
if(href.endsWith(".gif")) {
|
2016-03-31 09:18:40 +02:00
|
|
|
href = href.replace("http:", "https:");
|
2016-03-31 09:15:39 +02:00
|
|
|
$(this).replaceWith('<img src="'+href+'"></img>');
|
|
|
|
}
|
2016-02-09 18:08:20 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
agif.prototype.onMessage = function () {
|
|
|
|
this.convert();
|
|
|
|
};
|
|
|
|
agif.prototype.onSwitch = function () {
|
|
|
|
this.convert();
|
|
|
|
};
|
|
|
|
agif.prototype.start = function () {
|
|
|
|
this.convert();
|
|
|
|
};
|
|
|
|
|
|
|
|
agif.prototype.load = function () {};
|
|
|
|
agif.prototype.unload = function () {};
|
|
|
|
agif.prototype.stop = function () {};
|
|
|
|
agif.prototype.getSettingsPanel = function () {
|
|
|
|
return "";
|
|
|
|
};
|
|
|
|
|
|
|
|
agif.prototype.getName = function () {
|
|
|
|
return "Autogif";
|
|
|
|
};
|
|
|
|
agif.prototype.getDescription = function () {
|
2016-03-31 09:15:39 +02:00
|
|
|
return "Autoplay gifs without having to hover.";
|
2016-02-09 18:08:20 +01:00
|
|
|
};
|
|
|
|
agif.prototype.getVersion = function () {
|
|
|
|
return "0.1.0";
|
|
|
|
};
|
|
|
|
agif.prototype.getAuthor = function () {
|
|
|
|
return "Jiiks";
|
|
|
|
};
|