Skip to content

Commit 3ea0ee4

Browse files
authored
Merge pull request quoid#144 from quoid/v3.3.0
V3.3.0
2 parents 543fa8b + c52d887 commit 3ea0ee4

8 files changed

Lines changed: 180 additions & 56 deletions

File tree

ISSUE_TEMPLATE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
<!-- Please fill out the below information before submitting your issue -->
21
<!--
3-
If you are having issues with script injection, please include examples of what is not working and try the userscript below:
2+
Please fill out the below information before submitting your issue.
3+
4+
If you are having issues with script injection, please include examples of what is not working and try the userscript below to determine whether the issue is with the extension or your Javascript.
45
56
// ==UserScript==
6-
// @name TestScript
7-
// @description This is your new file, start writing code
8-
// @match *://*/*
7+
// @name TestScript
8+
// @description This is your new file, start writing code
9+
// @match <all_urls>
10+
// @exclude-match *://*.google.com/*
11+
// @noframes
912
// ==/UserScript==
1013
11-
console.log("This is a test script");
14+
console.log(`This is a test script - ${window.location.href}`);
1215
-->
1316

1417
_System Information:_
1518
> macOS version:
1619
> Userscripts version:
1720
> Safari version:
1821
> Is this issue related to script injection?
19-
> Did the test script run on your machine?
22+
> Did the test script (pasted above) successfully run on your machine?

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Userscripts Safari currently supports the following userscript metadata:
9191
- `@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](https://developer.chrome.com/extensions/match_patterns)
9292
- **Note:** this extension only supports `http/s`
9393
- `@exclude-match` - Domain patterns where you do *not* want the script to run
94-
- `@include` - An alias for `@match` - functions exactly like `@match`
95-
- `@exclude` - An alias for `@exclude-match` - functions exactly like `@exclude-match`
94+
- `@include` - Used to match against urls for injection, globs and regular expressions are allowed, [read more here](https://wiki.greasespot.net/Include_and_exclude_rules)
95+
- `@exclude` - Functions in a similar way as `@include` but rather than injecting, a match against this key's value will prevent injection
9696
- `@inject-into` - allows the user to choose which context to inject the script into
9797
- allows the user to choose which context to inject the script into
9898
- values: auto (default), content, page

extension/Userscripts Extension/Functions.swift

Lines changed: 155 additions & 34 deletions
Large diffs are not rendered by default.

extension/Userscripts Extension/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

extension/Userscripts.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@
417417
CODE_SIGN_ENTITLEMENTS = "Userscripts Extension/Userscripts Extension.entitlements";
418418
CODE_SIGN_IDENTITY = "Apple Development";
419419
CODE_SIGN_STYLE = Automatic;
420-
CURRENT_PROJECT_VERSION = 27;
420+
CURRENT_PROJECT_VERSION = 28;
421421
DEVELOPMENT_TEAM = J74Q8V8V8N;
422422
ENABLE_HARDENED_RUNTIME = YES;
423423
INFOPLIST_FILE = "Userscripts Extension/Info.plist";
@@ -426,7 +426,7 @@
426426
"@executable_path/../Frameworks",
427427
"@executable_path/../../../../Frameworks",
428428
);
429-
MARKETING_VERSION = 3.2.1;
429+
MARKETING_VERSION = 3.3.0;
430430
PRODUCT_BUNDLE_IDENTIFIER = "com.userscripts.macos.Userscripts-Extension";
431431
PRODUCT_NAME = "$(TARGET_NAME)";
432432
SKIP_INSTALL = YES;
@@ -440,7 +440,7 @@
440440
CODE_SIGN_ENTITLEMENTS = "Userscripts Extension/Userscripts Extension.entitlements";
441441
CODE_SIGN_IDENTITY = "Apple Development";
442442
CODE_SIGN_STYLE = Automatic;
443-
CURRENT_PROJECT_VERSION = 27;
443+
CURRENT_PROJECT_VERSION = 28;
444444
DEVELOPMENT_TEAM = J74Q8V8V8N;
445445
ENABLE_HARDENED_RUNTIME = YES;
446446
INFOPLIST_FILE = "Userscripts Extension/Info.plist";
@@ -449,7 +449,7 @@
449449
"@executable_path/../Frameworks",
450450
"@executable_path/../../../../Frameworks",
451451
);
452-
MARKETING_VERSION = 3.2.1;
452+
MARKETING_VERSION = 3.3.0;
453453
PRODUCT_BUNDLE_IDENTIFIER = "com.userscripts.macos.Userscripts-Extension";
454454
PRODUCT_NAME = "$(TARGET_NAME)";
455455
SKIP_INSTALL = YES;
@@ -466,15 +466,15 @@
466466
CODE_SIGN_IDENTITY = "Apple Development";
467467
CODE_SIGN_STYLE = Automatic;
468468
COMBINE_HIDPI_IMAGES = YES;
469-
CURRENT_PROJECT_VERSION = 27;
469+
CURRENT_PROJECT_VERSION = 28;
470470
DEVELOPMENT_TEAM = J74Q8V8V8N;
471471
ENABLE_HARDENED_RUNTIME = YES;
472472
INFOPLIST_FILE = Userscripts/Info.plist;
473473
LD_RUNPATH_SEARCH_PATHS = (
474474
"$(inherited)",
475475
"@executable_path/../Frameworks",
476476
);
477-
MARKETING_VERSION = 3.2.1;
477+
MARKETING_VERSION = 3.3.0;
478478
PRODUCT_BUNDLE_IDENTIFIER = com.userscripts.macos;
479479
PRODUCT_NAME = "$(TARGET_NAME)";
480480
SWIFT_VERSION = 5.0;
@@ -490,15 +490,15 @@
490490
CODE_SIGN_IDENTITY = "Apple Development";
491491
CODE_SIGN_STYLE = Automatic;
492492
COMBINE_HIDPI_IMAGES = YES;
493-
CURRENT_PROJECT_VERSION = 27;
493+
CURRENT_PROJECT_VERSION = 28;
494494
DEVELOPMENT_TEAM = J74Q8V8V8N;
495495
ENABLE_HARDENED_RUNTIME = YES;
496496
INFOPLIST_FILE = Userscripts/Info.plist;
497497
LD_RUNPATH_SEARCH_PATHS = (
498498
"$(inherited)",
499499
"@executable_path/../Frameworks",
500500
);
501-
MARKETING_VERSION = 3.2.1;
501+
MARKETING_VERSION = 3.3.0;
502502
PRODUCT_BUNDLE_IDENTIFIER = com.userscripts.macos;
503503
PRODUCT_NAME = "$(TARGET_NAME)";
504504
SWIFT_VERSION = 5.0;

src/Components/Sidebar/Item.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@
8585
on:click={e => toggle(e, data)}
8686
/>
8787
</div>
88-
<div class="item__description">{data.description}</div>
88+
<div class="item__description">{data.description || "No description provided"}</div>
8989
</div>

src/dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const defaultSettings = {
1818
showCount: "false",
1919
sortOrder: "lastModifiedDesc",
2020
tabSize: "4",
21-
version: "3.2.1"
21+
version: "3.3.0"
2222
};
2323

2424
// example file contents

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ export function validateURL(url) {
6363

6464
export function newScriptDefault(description, name, type) {
6565
if (type === "css") {
66-
return `/* ==UserStyle==\n@name ${name}\n@description ${description}\n@match *://*.*\n==/UserStyle== */`;
66+
return `/* ==UserStyle==\n@name ${name}\n@description ${description}\n@match <all_urls>\n==/UserStyle== */`;
6767
} else if (type === "js") {
68-
return `// ==UserScript==\n// @name ${name}\n// @description ${description}\n// @match *://*.*\n// ==/UserScript==`;
68+
return `// ==UserScript==\n// @name ${name}\n// @description ${description}\n// @match *://*/*\n// ==/UserScript==`;
6969
}
7070
}
7171

0 commit comments

Comments
 (0)