File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed
Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -155,9 +155,12 @@ function generateCard(data) {
155155 <p class="card-text">${ data . description } </p>
156156 <div class="d-flex justify-content-between align-items-center">
157157 <div class="btn-group">` ;
158- // Check for generatorUrl - if present, show "Generate" button instead of "Install"
159- if ( varExists ( data . generatorUrl ) ) {
160- html += `<a href="${ data . generatorUrl } " target="_blank" rel="noopener noreferrer"><button type="button" class="btn btn-sm btn-success">🚀 Generate</button></a> ` ;
158+ // Check for _generatorUrl - if present, show "Generate" button instead of "Install"
159+ if ( varExists ( data . _generatorUrl ) ) {
160+ html += `<a href="${ data . _generatorUrl } " target="_blank" rel="noopener noreferrer"><button type="button" class="btn btn-sm btn-success">🚀 Generate</button></a> ` ;
161+ } else if ( varExists ( data . _installUrl ) ) {
162+ // Use _installUrl if provided (full .json URL)
163+ html += `<a href="grayjay://plugin/${ data . _installUrl } " target="_blank" rel="noopener noreferrer"><button type="button" class="btn btn-sm btn-primary">Install</button></a> ` ;
161164 } else if ( varExists ( installUrl ) ) {
162165 html += `<a href="${ installUrl } " target="_blank" rel="noopener noreferrer"><button type="button" class="btn btn-sm btn-primary">Install</button></a> ` ;
163166 }
Original file line number Diff line number Diff line change 23112311 ]
23122312 },
23132313 "note" : " ⚠️ This is a generator tool! Visit https://grayjay-sources.github.io/grayjay-source-sto-like/ to create your custom plugin" ,
2314- "generatorUrl " : " https://grayjay-sources.github.io/grayjay-source-sto-like/"
2314+ "_generatorUrl " : " https://grayjay-sources.github.io/grayjay-source-sto-like/"
23152315 },
23162316 {
23172317 "name" : " Sample" ,
Original file line number Diff line number Diff line change 109109 "$ref" : " #/definitions/CustomButton"
110110 }
111111 },
112- "generatorUrl " : {
112+ "_generatorUrl " : {
113113 "type" : " string" ,
114114 "format" : " uri" ,
115115 "description" : " URL to a web-based generator for creating custom plugin instances. If present, shows a 'Generate' button instead of 'Install'"
116116 },
117+ "_installUrl" : {
118+ "type" : " string" ,
119+ "format" : " uri" ,
120+ "pattern" : " ^https?://.*\\ .json$" ,
121+ "description" : " Full URL to the config.json file for direct installation. Must be a valid .json URL (not relative)"
122+ },
117123 "_nsfw" : {
118124 "type" : " boolean" ,
119125 "description" : " Mark source as NSFW content. Will be filtered by default unless user opts in"
120126 },
127+ "_sourceUrl" : {
128+ "type" : " string" ,
129+ "format" : " uri" ,
130+ "description" : " Relative source URL before conversion to absolute"
131+ },
132+ "_iconUrl" : {
133+ "type" : " string" ,
134+ "format" : " uri" ,
135+ "description" : " Relative icon URL before conversion to absolute"
136+ },
121137 "iconUrl_" : {
122138 "type" : " string" ,
123- "format" : " uri"
139+ "format" : " uri" ,
140+ "description" : " Deprecated: Use _iconUrl instead"
124141 },
125142 "sourceUrl_" : {
126143 "type" : " string" ,
127- "format" : " uri"
144+ "format" : " uri" ,
145+ "description" : " Deprecated: Use _sourceUrl instead"
128146 },
129147 "allowAllHttpHeaderAccess" : {
130148 "type" : " boolean"
229247 "DomainHeadersToFind" : {
230248 "type" : " object" ,
231249 "additionalProperties" : true ,
232- "properties" : {
233- },
250+ "properties" : {},
234251 "required" : [],
235252 "title" : " DomainHeadersToFind"
236253 },
You can’t perform that action at this time.
0 commit comments