Discussions » Demandes de création de scripts
can someone fix this script?
I haven't run your script but it looks like you just need to add in your @grant values:
// @grant GM_getValue
// @grant GM_registerMenuCommand
// @grant GM_setValue
http://www.greasespot.net/2014/06/greasemonkey-20-release.html
Thanks, that fixed it.
If you want it to work in Chrome you also need to add this code segment now at the beginning, just after the metadata.
// Chrome Equivalent For getValue/setValue (thanks Joe Simmons!)
var isGM = (typeof GM_getValue != 'undefined' && typeof GM_getValue('a', 'b') != 'undefined'),
getValue = (isGM ? GM_getValue : (function(name, def) {var s=localStorage.getItem(name); return (s=="undefined" || s=="null") ? def : s})),
setValue = (isGM ? GM_setValue : (function(name, value) {return localStorage.setItem(name, value)}));
Script is broken with Firefox 57 and Greasemonkey 4, can someone help fix it again?
you can read about the changes in GM 4 for script authors here: https://www.greasespot.net/2017/09/greasemonkey-4-for-script-authors.html
I think my Advanced Image Viewer
Script does what you need. Maybe take a look? https://greasyfork.org/en/scripts/27738-advanced-image-viewer
can someone fix this script?
For some time Now I have been using this script I found with Firefox to make large images fit inside the browser window. It worked really well - it only resized images that were larger than the width of the firefox window,it kept them at the original aspect ratio, and would even resize the images automatically if you changed the size of the browser window.
I'm not sure what happened, if it's because of a firefox update (the script is 4-5 years old) or a conflict with some other addon, but it's not working anymore. Just doesn't do anything. Could someone take a look at it?