Skip to content

Commit

Permalink
docs(template): script tag/name
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Oct 26, 2024
1 parent fb9efe1 commit 74c4546
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
14 changes: 7 additions & 7 deletions template/egern.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,39 @@ version: "{{@package 'version'}}"

scriptings:
- http_response:
name: 'DualSubs.Spotify.Tracks.response.json'
name: '🍿️ DualSubs.Spotify.Tracks.response.json'
match: ^https?:\/\/api\.spotify\.com\/v1\/tracks\?
script_url: https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js
body_required: true
- http_request:
name: 'DualSubs.Spotify.Lyrics.request.json'
name: '🍿️ DualSubs.Spotify.Lyrics.request.json'
match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json
script_url: https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js
body_required: true
- http_request:
name: 'DualSubs.Spotify.Lyrics.request.proto'
name: '🍿️ DualSubs.Spotify.Lyrics.request.proto'
match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)
script_url: https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js
body_required: true
binary_body: true
- http_response:
name: 'DualSubs.Spotify.Translate.Lyrics.response.json'
name: '🍿️ DualSubs.Spotify.Translate.Lyrics.response.json'
match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
body_required: true
- http_response:
name: 'DualSubs.Spotify.Translate.Lyrics.response.proto'
name: '🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto'
match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
body_required: true
binary_body: true
- http_response:
name: 'DualSubs.Spotify.External.Lyrics.response.json'
name: '🍿️ DualSubs.Spotify.External.Lyrics.response.json'
match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External
script_url: https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js
body_required: true
- http_response:
name: 'DualSubs.Spotify.External.Lyrics.response.proto'
name: '🍿️ DualSubs.Spotify.External.Lyrics.response.proto'
match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External
script_url: https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js
body_required: true
Expand Down
14 changes: 7 additions & 7 deletions template/loon.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
{{{arguments}}}

[Script]
http-response ^https?:\/\/api\.spotify\.com\/v1\/tracks\? requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js, tag=DualSubs.Spotify.Tracks.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/api\.spotify\.com\/v1\/tracks\? requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js, tag=🍿️ DualSubs.Spotify.Tracks.response.json, argument={{{scriptParams}}}

http-request ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.Spotify.Lyrics.request.json, argument={{{scriptParams}}}
http-request ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*) requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.Spotify.Lyrics.request.proto, argument={{{scriptParams}}}
http-request ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.Spotify.Lyrics.request.json, argument={{{scriptParams}}}
http-request ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*) requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.Spotify.Lyrics.request.proto, argument={{{scriptParams}}}

http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.Spotify.Translate.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.Spotify.Translate.Lyrics.response.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Spotify.Translate.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto, argument={{{scriptParams}}}

http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=DualSubs.Spotify.External.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=DualSubs.Spotify.External.Lyrics.response.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=🍿️ DualSubs.Spotify.External.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, tag=🍿️ DualSubs.Spotify.External.Lyrics.response.proto, argument={{{scriptParams}}}

[MITM]
hostname = api.spotify.com, spclient.wg.spotify.com
8 changes: 4 additions & 4 deletions template/quantumultx.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
#!version = {{@package 'version'}}

#[rewrite_local]
# DualSubs.Spotify.Tracks.response
# 🍿️ DualSubs.Spotify.Tracks.response
^https?:\/\/api\.spotify\.com\/v1\/tracks\? url script-response-body https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js

# DualSubs.Spotify.Lyrics.request
# 🍿️ DualSubs.Spotify.Lyrics.request
^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*) url script-request-body https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js

# DualSubs.Spotify.Translate.Lyrics.response
# 🍿️ DualSubs.Spotify.Translate.Lyrics.response
^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

# DualSubs.Spotify.External.Lyrics.response
# 🍿️ DualSubs.Spotify.External.Lyrics.response
^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)subtype=External url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js

#[mitm]
Expand Down
22 changes: 11 additions & 11 deletions template/stash.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,50 @@ http:
- "spclient.wg.spotify.com"
script:
- match: ^https?:\/\/api\.spotify\.com\/v1\/tracks\?
name: DualSubs.Spotify.response
name: 🍿️ DualSubs.Spotify.response
type: response
require-body: true

- match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json
name: DualSubs.Spotify.request
name: 🍿️ DualSubs.Spotify.request
type: request
require-body: true
- match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)
name: DualSubs.Spotify.request
name: 🍿️ DualSubs.Spotify.request
type: request
require-body: true
binary-mode: true

- match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate
name: DualSubs.Translate.Lyrics.response
name: 🍿️ DualSubs.Translate.Lyrics.response
type: response
require-body: true
- match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate
name: DualSubs.Translate.Lyrics.response
name: 🍿️ DualSubs.Translate.Lyrics.response
type: response
require-body: true
binary-mode: true

- match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External
name: DualSubs.External.Lyrics.response
name: 🍿️ DualSubs.External.Lyrics.response
type: response
require-body: true
- match: ^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External
name: DualSubs.External.Lyrics.response
name: 🍿️ DualSubs.External.Lyrics.response
type: response
require-body: true
binary-mode: true

script-providers:
DualSubs.Spotify.request:
🍿️ DualSubs.Spotify.request:
url: https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js
interval: 86400
DualSubs.Spotify.response:
🍿️ DualSubs.Spotify.response:
url: https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js
interval: 86400
DualSubs.Translate.Lyrics.response:
🍿️ DualSubs.Translate.Lyrics.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
interval: 86400
DualSubs.External.Lyrics.response:
🍿️ DualSubs.External.Lyrics.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js
interval: 86400
14 changes: 7 additions & 7 deletions template/surge.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
#!arguments-desc = {{{argumentsDesc}}}

[Script]
DualSubs.Spotify.Tracks.response.json = type=http-response, pattern=^https?:\/\/api\.spotify\.com\/v1\/tracks\?, requires-body=1, engine=webview, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.Tracks.response.json = type=http-response, pattern=^https?:\/\/api\.spotify\.com\/v1\/tracks\?, requires-body=1, engine=webview, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/response.bundle.js, argument={{{scriptParams}}}

DualSubs.Spotify.Lyrics.request.json = type=http-request, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json, requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
DualSubs.Spotify.Lyrics.request.proto = type=http-request, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*), requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.Lyrics.request.json = type=http-request, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json, requires-body=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.Lyrics.request.proto = type=http-request, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*), requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Spotify/releases/download/v{{@package 'version'}}/request.bundle.js, argument={{{scriptParams}}}

DualSubs.Spotify.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
DualSubs.Spotify.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.Translate.Lyrics.response.json = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.Translate.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=Translate, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument={{{scriptParams}}}

DualSubs.Spotify.External.Lyrics.response.json = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
DualSubs.Spotify.External.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.External.Lyrics.response.json = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/(.+)\?(.*)format=json(.*)subtype=External, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}
🍿️ DualSubs.Spotify.External.Lyrics.response.proto = type=http-response, pattern=^https?:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/\w+\?(.*)subtype=External, requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/External.Lyrics.response.bundle.js, argument={{{scriptParams}}}

[MITM]
hostname = %APPEND% api.spotify.com, spclient.wg.spotify.com

0 comments on commit 74c4546

Please sign in to comment.