Conversaciones » Desarrolladores
please help transform this 3 lines js to GM format
// ==UserScript==
// @name your script name
// @namespace anything is ok
// @version anything is ok
// @description something your script description
// @author your name
// @include website that you want to run this script,one per include line,such as bellow line will run this script in this page.you can use * for wildcard.add your own include site and delete this line and bellow line
// @include https://greasyfork.org/zh-CN/forum/discussion/53597/please-help-transform-this-3-lines-js-to-gm-format
// @run-at document-end
// @notice as default the script will run at document-end,you can try change up line according to https://wiki.greasespot.net/Metadata_Block#.40run-at if your script didn't run exactly. if you try all the value and the script still did't work,maybe you should change your script
// ==/UserScript==
(function() {
'use strict';
// Your code here...
document.addEventListener('DOMContentLoaded',function(r){
r=/&thumb=1/;
[].map.call(this.images,function(t){t.src=t.src.replace(r,'')})
})
})();
please help transform this 3 lines js to GM format
Hi, years ago I got this javascript from online help, now everything changed and I want to transform it into tampermonkey format. This script is to show original image directly, instead of thumbnail. (by simply remove "thumb=1")
And, the source code of an image's context is like:
Don't know if it's easy? Appreciate any response.