diff --git a/CHANGELOG.md b/CHANGELOG.md
index c50d59eb..3500e741 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
# Changelog
-## v2.0.0 (TBD)
+## v2.0.1 (2020-07-27)
+- @include/@exclude are now aliases for @match/@exlcude-match
+- Display an error when browser is not supported
+
+## v2.0.0 (2020-07-10)
- Complete overhaul/rewrite of the extension
- UI now lives in a page rather than popover
- Enables multiple, domain specific, scripts
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
new file mode 100644
index 00000000..426b1deb
--- /dev/null
+++ b/ISSUE_TEMPLATE.md
@@ -0,0 +1,6 @@
+
+
+_System Information:_
+> macOS version:
+> Userscripts version:
+> Safari version:
diff --git a/README.md b/README.md
index 700f3caa..f19b07a5 100644
--- a/README.md
+++ b/README.md
@@ -41,10 +41,14 @@ If you don't feel like reading, visit [this folder](/etc/videos/) to watch some
Version 2.0.0 introduces the common practice of using userscript metadata to drive certain functionality. The currently supported fields will be listed below. There *are* plans to support more fields in future updates.
-- `@name` **(required)** - 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 scripts of the same type.
-- `@description` **(optional)** - Use this to describe what your userscript does. This will be displayed in the sidebar. There is a setting to hide userscript descriptions.
-- `@match` **(optional)** - Domain match patterns; you can use several instances of this metafield if you'd like multiple domain matches. If you omit this metafield, the userscript will never run. View [this article for more information on constructing patterns](https://developer.chrome.com/extensions/match_patterns)
-- `@exclude-match` **(optional)** - Domain patterns where you do *not* want the script to run
+- `@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 scripts 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 userscript 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](https://developer.chrome.com/extensions/match_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`
+
+**All userscripts need at least 1 `@match` or `@include` to run!**
CSS Userscripts/styles can use the javascript metadata format or the Userstyle format. Both formats shown below are valid for **css** type.
@@ -85,6 +89,12 @@ Currently there is only one keyboard shortcut - `cmd+s` to save changes. *Note:*
Your previous userscript file *should* still exist after update. You can access its folder by clicking the link in the extension's settings modal option labelled "Save Location" or by visiting `~/Library/Containers/com.userscripts.macos.Userscripts-Extension/Data/Documents/`.
+**How can I help development**
+
+Any issue marked "help wanted" is actively seeking assistance. Please respond to those issues with feedback, guidance or offer 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.
+
+If you are willing to beta test new versions of the extension, [you can sign up here](https://forms.gle/QB46uYQHVyCxULue9).
+
## Feedback & Support
If you need help doing something with this extension or you have an idea for an enhancement, please open an issue. Be sure to search current and closed issues before opening a new one.
diff --git a/demo/index.html b/demo/index.html
index d306afe0..1bae25da 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -1,4 +1,4 @@
-
Userscripts Safari
This is a notify message
New CSS
New Javascript
js
css
Placeholder Userscript
Lorem ipsum dolor sit amet, consectetur adipiscing cabro sedint do eiusmod tempor incididunt ut labore et dolore magna aliqua. Q enim ad minim. Lorem ipsum dolor sit amet consectetur adipiscing cabro.
css
js
init
init
init
init
init
init
init
init
init
init
init
init
init
init
+Userscripts Safari
New CSS
New Javascript
js
css
Placeholder Userscript
Lorem ipsum dolor sit amet, consectetur adipiscing cabro sedint do eiusmod tempor incididunt ut labore et dolore magna aliqua. Q enim ad minim. Lorem ipsum dolor sit amet consectetur adipiscing cabro.
css
js
init
init
init
init
init
init
init
init
init
init
init
init
init
init
@@ -19,4 +19,4 @@
-->
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extension/Userscripts Extension/Functions.swift b/extension/Userscripts Extension/Functions.swift
index b27f2737..b5e1235a 100644
--- a/extension/Userscripts Extension/Functions.swift
+++ b/extension/Userscripts Extension/Functions.swift
@@ -528,6 +528,15 @@ func updateScriptsData() -> [[String: Any]]? {
// can force unwrap b/c already checked match is not nil
matched = metadata["match"]!
}
+ // check for legacy include & exclude
+ if metadata["include"] != nil {
+ // can force unwrap b/c already checked match is not nil
+ matched.append(contentsOf: metadata["include"]!)
+ }
+ if metadata["exclude"] != nil {
+ // can force unwrap b/c already checked match is not nil
+ excluded.append(contentsOf: metadata["exclude"]!)
+ }
if !updateExcludesAndMatches(filename, excluded, matched) {
err("error updating matches in func updateScriptsData")
}
@@ -677,8 +686,13 @@ func saveScriptFile(_ scriptData: [String: String]) -> [String: String]? {
}
// update new excludes and matches
- let excludes = metadata["exclude-match"] ?? []
- let matches = metadata["match"] ?? []
+ var excludes = metadata["exclude-match"] ?? []
+ var matches = metadata["match"] ?? []
+ // check for legacy include & exclude
+ let includeLegacy = metadata["include"] ?? []
+ let excludeLegacy = metadata["exclude"] ?? []
+ matches.append(contentsOf: includeLegacy)
+ excludes.append(contentsOf: excludeLegacy)
if !updateExcludesAndMatches(newFilename, excludes, matches) {
err("failed to update manifest record for new filename when attempting to save script file")
}
diff --git a/extension/Userscripts Extension/index.html b/extension/Userscripts Extension/index.html
index e6bf3a12..f8a36395 100644
--- a/extension/Userscripts Extension/index.html
+++ b/extension/Userscripts Extension/index.html
@@ -1,4 +1,4 @@
-Userscripts Safari
This is a notify message
New CSS
New Javascript
js
css
Placeholder Userscript
Lorem ipsum dolor sit amet, consectetur adipiscing cabro sedint do eiusmod tempor incididunt ut labore et dolore magna aliqua. Q enim ad minim. Lorem ipsum dolor sit amet consectetur adipiscing cabro.
css
js
init
init
init
init
init
init
init
init
init
init
init
init
init
init
+Userscripts Safari
New CSS
New Javascript
js
css
Placeholder Userscript
Lorem ipsum dolor sit amet, consectetur adipiscing cabro sedint do eiusmod tempor incididunt ut labore et dolore magna aliqua. Q enim ad minim. Lorem ipsum dolor sit amet consectetur adipiscing cabro.