Skip to content

Commit

Permalink
Added clip support to SafeTwitch #833
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Oct 18, 2023
1 parent ea53506 commit 4e379b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,12 @@ function redirect(url, type, initiator, forceRedirection) {
}
return `${randomInstance}`
}
case "safetwitch": {
if (url.hostname.startsWith("clips.")) {
return `${randomInstance}/clip${url.pathname}${url.search}`
}
return `${randomInstance}${url.pathname}${url.search}`
}
default: {
return `${randomInstance}${url.pathname}${url.search}`
}
Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
}
},
"targets": [
"^https?:\\/{2}(www\\.)?twitch\\.(tv|com)\\/"
"^https?:\\/{2}(www\\.|clips\\.)?twitch\\.(tv|com)\\/"
],
"name": "Twitch",
"options": {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "2.8.0",
"version": "2.8.1",
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {
Expand Down

0 comments on commit 4e379b0

Please sign in to comment.