otter-browser icon indicating copy to clipboard operation
otter-browser copied to clipboard

Improved Greasemonkey compatibility

Open Emdek opened this issue 9 years ago • 8 comments

Currently we have basic support for user scripts, but to support more of existing scripts we have to support some extra features.

The most important stuff:

  • [x] respecting @exclude, @include and @match keywords;
  • [ ] support for extra JavaScript APIs exposed by GM, plus support for @grant keyword;
  • [ ] support for @resource and @requires keywords.

Other tasks:

  • [x] support for @icon keyword;
  • [x] UI to manage scripts;
  • [ ] support for updating scripts.

Emdek avatar Mar 28 '16 12:03 Emdek

Note that for the moment, users can look at e.g. http://userscripts-mirror.org/scripts/show/105153 for the GM API.

Frenzie avatar Mar 28 '16 13:03 Frenzie

@Frenzie, good catch. I guess that this one could be a good reference implementation to test our implementation.

Emdek avatar Mar 28 '16 13:03 Emdek

@Emdek @Frenzie thanks

where am I to put the directory, I did check settings, about:config and also the Otter settings directory for a subdirectory, all with no luck. unless this is coming in 118?

uahim avatar Mar 29 '16 15:03 uahim

@uahim, right now it is a bit complex task... I'll try to land some basic Addons Manager before beta.

Emdek avatar Mar 29 '16 16:03 Emdek

ah sorry didn't see the "in progress" label; figured it was already usable

uahim avatar Mar 29 '16 16:03 uahim

@run-at should also be supported.

Especially '@run-at document-start' since it's pretty much mandatory for complete restyling scripts. For example I use it in other browsers for a "dynamic contrast" script that makes every background colors a bit darker, and text brighter. (For now I use a user-css in Otter, but it can only set absolute color)

OVNI-modding avatar Mar 27 '18 10:03 OVNI-modding

@OVNI-modding, currently run-at is only fully supported with QtWebEngine backend. In theory we could already improve it on QtWebKit side but it's harder to properly map injection time without dedicated API for running user scripts...

Emdek avatar Apr 26 '18 12:04 Emdek

Is this still on track?

ShalokShalom avatar Mar 09 '25 20:03 ShalokShalom