All Projects → quoid → Userscripts

quoid / Userscripts

Licence: gpl-3.0
An open-source userscript editor for Safari

Projects that are alternatives of or similar to Userscripts

Stay
Stay is a local userscript manager and an extension sample for Safari on iOS/iPadOS.
Stars: ✭ 672 (+157.47%)
Mutual labels:  safari-extension, userscript, safari
Ultratabsaver
The open source Tab Manager Extension for Safari.
Stars: ✭ 178 (-31.8%)
Mutual labels:  safari, safari-extension
Ublock
uBlock: a fast, lightweight, and lean blocker for Chrome, Firefox, and Safari.
Stars: ✭ 8,075 (+2993.87%)
Mutual labels:  safari, safari-extension
snoozz-tab-snoozing
A Web Extension to declutter windows by snoozing tabs for later
Stars: ✭ 105 (-59.77%)
Mutual labels:  safari-extension, safari
Polyglot
🌏 The missing Safari extension that translates selected text into your native language.
Stars: ✭ 387 (+48.28%)
Mutual labels:  safari, safari-extension
Select Like A Boss For Safari
Extension for Safari that allows you to select text inside links.
Stars: ✭ 30 (-88.51%)
Mutual labels:  safari, safari-extension
Remove Google Redirection
Remove redirection and click-tracking in Google search results.
Stars: ✭ 111 (-57.47%)
Mutual labels:  userscript, safari-extension
Adguardforsafari
AdGuard for Safari app extension
Stars: ✭ 544 (+108.43%)
Mutual labels:  safari, safari-extension
GithubTower
This browser extension allows you to use Github's "Clone in Desktop" button with Tower
Stars: ✭ 48 (-81.61%)
Mutual labels:  safari-extension, safari
session-buddy
An ultra-light Safari extension helps you save open tabs as collections that can be easily restored later
Stars: ✭ 108 (-58.62%)
Mutual labels:  safari-extension, safari
SponsorBlockSafari
Safari web-extension glue code for SponsorBlock
Stars: ✭ 27 (-89.66%)
Mutual labels:  safari-extension, safari
Npmhub
🔎 A browser extension to explore npm dependencies on GitHub repos
Stars: ✭ 542 (+107.66%)
Mutual labels:  safari-extension, svelte
Safari Extensions
Awesome Safari extensions
Stars: ✭ 252 (-3.45%)
Mutual labels:  safari, safari-extension
xcloud-keyboard-mouse
Chrome extension for controlling Xbox Cloud Gaming (Project xCloud) using a keyboard and mouse
Stars: ✭ 78 (-70.11%)
Mutual labels:  safari-extension, safari
github-toc
📖 Browser extension that adds a table of contents to GitHub repos, wikis and gists.
Stars: ✭ 71 (-72.8%)
Mutual labels:  safari-extension, safari
104-ignore-not-interesting
過濾 104人力銀行 搜尋結果中你不感興趣的職缺 | Ignore jobs you are not interested in on 104
Stars: ✭ 25 (-90.42%)
Mutual labels:  userscript, svelte
svelte-themer
A theming engine for your Svelte apps using CSS Variables, persisted.
Stars: ✭ 88 (-66.28%)
Mutual labels:  svelte
Kinopoisk-Watch
Скрипт, превращающий Kinopoisk.ru в онлайн - кинотеатр! 🎥
Stars: ✭ 85 (-67.43%)
Mutual labels:  userscript
actus
A monorepo for a self learning command palette driven by a final state machine implemented in XState.
Stars: ✭ 43 (-83.52%)
Mutual labels:  svelte
svelte-interview-questions
Concepts and Questions related to Svelte - Part of official Svelte resources list
Stars: ✭ 18 (-93.1%)
Mutual labels:  svelte

Userscripts Safari

An open-source userscript editor for Safari.

Userscripts Safari

Installation

Install via Mac App Store or clone the project and build with Xcode. Alternatively, you can download the most current version for the releases page.

UI Overview

Userscripts Safari Main Application Window

  1. Extension button - click this button to open the extension interface
  2. Filter bar - use this input to filter items in the sidebar, by name
  3. Sort button - changes the order of the items in the sidebar by name or modified time
  4. Sidebar buttons - described left to right
    • The settings button (represented by a cog) displays the settings modal (discussed below)
    • The plus button allows users to add new items
      • New CSS is a "userscript" that expects CSS code
      • New Javascript is a prototypical userscript that expects Javascript code
      • New Remote allows the user to add a remote hosted userscript (or style) by inputting the web address (ex: https://www.k21p.com/example.user.js)
  5. Item toggle - this toggle enables or disables an item
  6. Item - this is the userscript (or style), clicking on it will load it's contents into the editor - you can hide descriptions in the settings area!
  7. Editor buttons (top) - described left to right
    • Update button - this button allows you to update userscripts that meet the following conditions
      • metadata contains @version tag
      • metadata contains @updateURL tag
    • Download button - click this button to download a copy of your userscript
      • Note: every userscript that is displayed in the interface is already present on your local machine, at your save location - the download button offers a quick way to retrieve a copy of that file, without needing to click the settings button, and then the save location link within the settings modal
    • Trash button - moves the currently loaded userscript to the trash bin - it will subsequently be removed from the interface and save location
  8. Editor buttons (bottom)
    • Discard - while editing, reverts any unsaved changes you've made to a userscript
    • Save - while editing, saves all changes you've made to a userscript
      • Command + S is the keyboard shortcut for the action

Userscripts Safari Settings Window

Settings:

  • Auto Hint - automatically shows completion hints while editing
  • Hide Descriptions - hides the item descriptions in the sidebar
  • Show Invisibles - toggles the display of invisible characters in the editor
  • Javascript Linter - toggles basic Javascript linting within the editor
  • Tab Size - the number of spaces a tab is equal to while editing, obviously defaults to 4 because using 2 spaces is absolute insanity
  • Log Activity - shows some extra messages in the browser console when certain events take place
  • Save Location - where your file are currently located and being saved to (click the blue text to open location)
  • Change Save Location (cogs icon) - this button, located directly to the right of the save location, is a shortcut for opening the host app, which will allow you to change the save location
  • Global Blacklist - all domain patterns listed here will be globally ignored for script injection

Userscript Metadata

Userscripts Safari currently supports the following userscript metadata:

  • @name - This will be the name that displays in the sidebar and be used as the filename - you can not use the same name for multiple files of the same type
  • @description- Use this to describe what your userscript does - this will be displayed in the sidebar - there is a setting to hide descriptions
  • @match - Domain match patterns - you can use several instances of this field if you'd like multiple domain matches - view this article for more information on constructing patterns
  • @exclude-match - Domain patterns where you do not want the script to run
  • @include - An alias for @match - functions exactly like @match
  • @exclude - An alias for @exclude-match - functions exactly like @exclude-match
  • @inject-into - allows the user to choose which context to inject the script into
    • allows the user to choose which context to inject the script into
    • values: auto, content, page (default)
    • works like violentmonkey
  • @run-at
    • allows the user to choose the injection timing
    • document-start, document-end (default), document-idle
    • works like violentmonkey
  • @weight
    • allows the user to further adjust script injection timing
    • can be used to ensure one script injects before another
    • ONLY accepts integers (floats, strings and everything else will be ignored)
    • min value = 1, max value = 999, higher numbers (“heavier”) execute earlier
  • @require
    • allows users to include remote resources in their scripts
    • the value must be a valid url, currently no local file support
    • must require a resource of the same file type (js for js, css for css)
    • when a resource is required, it is downloaded and saved locally
    • the resources is downloaded once at save and never checked for updates or parsed in anyway
      • if you want to update the require resources, and the url does not change, you must remove the resources, save, then re-input it
    • require remote resources at your own risk, the extension never validates remote resource code in any way and be aware that using remote resources from untrusted sources can jeopardize your personal security
  • @version
    • used to determine the current version of a userscript
    • when paired with @updateURL, this will allow the user to update a userscript from a remote source, if the version on their machine is < version at the update URL
    • @version does nothing by itself, it needs to be paired with@updateURL for remote updating to function properly
  • @updateURL
    • the remote url to check version against
    • if the version of the file located at the update URL is > the version on the local machine, the file will be updated
    • @updateURL does nothing by itself, it needs to be paired with @version for remote updating to function properly
  • @downloadURL
    • optional download location for a remotely updateable file (*i.e. a file that has both @version and @updateURL)
    • when paired with @version and @updateURL, if the local version is < the version of the file that @updateURL points to, the extension will attempt to update the file's code with the contents of the file located at the @downloadURL
    • @downloadURL does nothing by itself, it needs @version and @updateURL to present in order to function properly
  • @noframes
    • this key takes no value
    • prevents code from being injected into nested frames

All userscripts need at least 1 @match or @include to run!

Save Location

In order to change the save location, you must either launch Userscripts.app as you would any other application, or open the settings modal within the browser extension and click the "settings" icon within the "Save location" row.

Once the host app is open, you will see a button called "Change save location". Click this and select the directory where you'd like to save to/load from.

Save Location Notes

  • Close all instances of the extension UI (browser app) before you change the save location. The extension will attempt to do this automatically, but it could fail (if it does, please bug report)
  • Currently, when changing the save location, the app does not copy over userscripts from the previous save/load directory
  • After a new save location is selected, if you rename or move that selected folder, the extension will continue to load/save to that location - the only way to remove the “link” is by trashing the folder or selecting a new save location

FAQs

Do I need to use the extension's editor to create new userscripts or to edit existing?

You can use your own editor to update and manage your files. As long as you are saving the files to the save location, and they are porperly formatted, they should be injected. However, you must open the extension page beforehand. That means, if you create a new userscript and save it to the save location, before injection will occur properly, the extension page must be open (by clicking the extension button in Safari.

What are the the keyboard shortcuts?

While editing a file, clicking Command + S will save the file. While working the editor, clicking Command + F will bring up the search bar.

When I use @require, where are the required files stored?

All required files are saved as Javascript files in the extension container folder in macOS 11.x. That folder is located in the default save location, at: ~/Library/Containers/Userscripts/Data/Documents/require/.

If you move files from the require folder or manually edit the manifest.json file, you will likely break app/extension functionality.

Support Development

Currently, there are a few ways you can support the development of this extension. The first way is simple; if you enjoy using the extension, consider leaving a positive review on the App Store. Seeing the reviews motivates me to continue working on the development.

Secondly, you can sign up to be a beta tester. Since this extension values your privacy, and does not collect any data from users, it's hard for me to gauge how the extension is being used. By signing up to be a beta tester it not only allows you to test upcoming versions, but also give me the opportunity to elicit feedback from real users.

Last, any issue marked "help wanted" is actively seeking assistance. Please respond to those issues with feedback, guidance or offers of coding assistance. Outside of those issues, it is fair to assume outstanding issues are already being worked on and new features are being actively developed.

Privacy Policy

Userscripts does not collect any data from its users nor monitor activities or actions you perform within the application and extension. This means everything that you do with the application and extension is private to you and is never shared with the developers or third parties. Since there is no data collection, there is no data retention of any kind.

License

Licensed under the GNU General Public License v3.0 license for all open source applications. A commercial license is required for all other applications.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].