BetterDiscordApp-v2/Plugins/AutoPlayGifs.plugin.js

42 lines
957 B
JavaScript
Raw Normal View History

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() {
2016-03-31 09:31:17 +02:00
var src = $(this).attr("src");
if(src != undefined) {
$(this).replaceWith('<img src="'+src+'"></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";
};