Skip to content

This is the Firefox add-on that loads, like uc / userChromeJS+Sub-Script Loader, user scripts that uses the WebExtension APIs via WebDAV server. / 『userChromeES』は、uc / userChromeJS+サブスクリプトローダ 風に、WebExtension APIを叩くユーザースクリプトを読み込むFirefoxアドオンです。

License

Notifications You must be signed in to change notification settings

esperecyan/user-chrome-es

Repository files navigation

English / 日本語

userChromeES

This is the Firefox add-on that loads, like uc / userChromeJS+Sub-Script Loader, user scripts that uses the WebExtension APIs via WebDAV server.

* This is not an add-on that make accessing the XPCOM API a possibility so absolutely nothing compatible with scripts for the userChromeJS.

Tha reason this add-on uses WebDAV server is add-ons cannot load local files using WebExtension API. Therefore, you need to built WebDAV server.

This add-on loads files which extension is *.uc.js or *.uc.es from the WebDAV directory URL specified by add-on’s options when this add-on startup. It does not load from sub directories.

Installation

In the [Downloads] section of the Releases page, click on the link that says "user-chrome-es-xxx.xpi".

As a side note, this add-on has been removed from Addons.mozilla.org (AMO) because it was regarded loading local script files as loading remote code for execution.

MetaData

Each of user scripts needs Greasemonkey-style metadata block. This add-on will read the following keys.

Meta key name Description
@name Name of the script.
@description Name of the script.
@include Location that the script runs. Recognized values are:
  • background
  • popup
  • options
  • devtools
  • sidebar
This key may be used multiple times.
Required

Code Example

Extend popup, options, or sidebar

Unless script replace whole page, this add-on assumes markups (children of body element) such as:

  • ul
    • li
      • Element been :only-child (such as an a element or a button element)
        • img
        • Text or element
    • ……

/options/options.xhtml

  • article
    • h1
    • Element
    • ……
  • ……

/sideber/sideber.xhtml

  • menu
    • li
      • details
        • summary
        • menu
          • li
          • ……
    • li
      • Element been :only-child (such as an a element or a button element)
        • img
        • Text or element
    • ……

permissions / optional_permissions

User scripts can use all the WebExtension APIs but the following permissions are contained in optional_permissions manifest.json key. Therefore, they need to request permissions using permissions API as an example, after they opened /options/options.xhtml in a normal browser tab.

  • Host permissions for URLs other than http://localhost/*
  • bookmarks
  • browserSettings
  • clipboardRead
  • clipboardWrite
  • cookies
  • downloads
  • downloads.open
  • find
  • geolocation
  • history
  • idle
  • tabs
  • topSites
  • webNavigation
  • webRequest
  • webRequestBlocking

They can also request activeTab permission.

Contribution

Please Pull Request or open your Issue.

Licence

This add-on is licensed under the Mozilla Public License Version 2.0 (MPL-2.0).

The files in this directory are parts of Firefox add-on Greasemonkey and are script codes licensed under the MIT License.

About

This is the Firefox add-on that loads, like uc / userChromeJS+Sub-Script Loader, user scripts that uses the WebExtension APIs via WebDAV server. / 『userChromeES』は、uc / userChromeJS+サブスクリプトローダ 風に、WebExtension APIを叩くユーザースクリプトを読み込むFirefoxアドオンです。

Resources

License

Stars

Watchers

Forks

Packages

No packages published