Changes: - several functions were converted to async functions, specifically the ones that use *GM*. - language is detected with *document.documentElement.lang *instead of *unsafeWindow.google.kHL.* - *@grant unsafeWIndow *was removed.
Notes: - *UpdateCheck()* function doesn't work because userscript-mirror.org obviously doesn't serve updates anymore. On Sunday, June 3, 2018 at 3:01:07 AM UTC-7, [email protected] wrote: > > Hi, > > how can I make this script compatible to GM4? > http://userscripts-mirror.org/scripts/show/153171 > It worked in GM3 without problems. > > I have done everything listed in the "Greasemonkey 4 For Script Authors" > article, i.e. replaced GM_ with GM. and added the missing addStyle function > from here (copy & paste): > https://github.com/greasemonkey/gm4-polyfill/blob/master/gm4-polyfill.js#L33 > > The script works to some extent now, but when I actually want to change > the language (via. an entry injected in the "Tools" menu under the Google > search bar), the menu is empty (instead of listing other languages) and the > console shows me an error with "Content Security Policy" and that it > could not load a ressource because "script-src" setting (not sure if > related though). > > Attached you can find my modified script. > > Any ideas what I would need to change? > > Best, > Herbert > -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
