Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ Once the host app is open, you will see a button called "Change save location".

> 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](https://apps.apple.com/us/app/userscripts/id1463298887). Seeing the reviews motivates me to continue working on the development.

Expand Down
Binary file added etc/App Store Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added etc/uilayout.sketch
Binary file not shown.
2 changes: 1 addition & 1 deletion extension/Userscripts Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 Justin Wasack. All rights reserved.</string>
<string>Copyright © 2021 Justin Wasack. All rights reserved.</string>
<key>NSHumanReadableDescription</key>
<string>Save and run javascript for the web pages you visit</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion extension/Userscripts Extension/index.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions extension/Userscripts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
CODE_SIGN_ENTITLEMENTS = "Userscripts Extension/Userscripts Extension.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = J74Q8V8V8N;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Userscripts Extension/Info.plist";
Expand All @@ -418,7 +418,7 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 3.0.1;
MARKETING_VERSION = 3.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.userscripts.macos.Userscripts-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -432,7 +432,7 @@
CODE_SIGN_ENTITLEMENTS = "Userscripts Extension/Userscripts Extension.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = J74Q8V8V8N;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Userscripts Extension/Info.plist";
Expand All @@ -441,7 +441,7 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 3.0.1;
MARKETING_VERSION = 3.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.userscripts.macos.Userscripts-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -458,15 +458,15 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = J74Q8V8V8N;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = Userscripts/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 3.0.1;
MARKETING_VERSION = 3.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.userscripts.macos;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -482,15 +482,15 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 24;
DEVELOPMENT_TEAM = J74Q8V8V8N;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = Userscripts/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 3.0.1;
MARKETING_VERSION = 3.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.userscripts.macos;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion extension/Userscripts/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 Justin Wasack. All rights reserved.</string>
<string>Copyright © 2021 Justin Wasack. All rights reserved.</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
Expand Down
1 change: 1 addition & 0 deletions index.html

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
// start initialization process
safari.extension.dispatchMessage("REQ_INIT_DATA");
});

// currently inactive, but could be used to globally prevent auto text replacement in app
// eslint-disable-next-line no-unused-vars
function preventAutoTextReplacements(e) {
if (e.inputType === "insertReplacementText" && e.data === ". ") {
e.preventDefault();
e.target.value += " ";
}
}
</script>

<style>
Expand Down
12 changes: 12 additions & 0 deletions src/Components/Editor/CodeMirror.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@
instance.on("blur", () => keysPressed = []);

instance.on("change", onChange);

instance.on("beforeChange", preventAutoFullStops);
}

function activateSearch() {
Expand Down Expand Up @@ -199,6 +201,16 @@
}
}

function preventAutoFullStops(cm, changeObj) {
if (
changeObj.origin === "+input"
&& changeObj.text.length === 1
&& changeObj.text[0] === ". ")
{
changeObj.update(changeObj.from, changeObj.to, [" "]);
}
}

// disables the editor
function disable() {
instance.setOption("readOnly", "nocursor");
Expand Down
1 change: 0 additions & 1 deletion src/Components/Editor/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
position: absolute;
right: 0.5rem;
top: 0;
width: 18rem;
z-index: 4;
}

Expand Down
1 change: 1 addition & 0 deletions src/Components/Sidebar/Filter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
autocapitalize="off"
autocomplete="off"
spellcheck="false"
autocorrect="off"
bind:value={query}
{disabled}
>
Expand Down
2 changes: 1 addition & 1 deletion src/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const defaultSettings = {
showInvisibles: "true",
sortOrder: "lastModifiedDesc",
tabSize: "4",
version: "3.0.1"
version: "3.0.2"
};

// example file contents
Expand Down