(script, displayName)
| 54 | |
| 55 | /** URL that shows the name of the script and opens in devtools sources or in our editor */ |
| 56 | export function getScriptPrettyUrl(script, displayName) { |
| 57 | return `${ |
| 58 | extensionRoot |
| 59 | }${ |
| 60 | // When called from prepareScript, adding a space to group scripts in one block visually |
| 61 | displayName && IS_FIREFOX ? '%20' : '' |
| 62 | }${ |
| 63 | encodeURIComponent((displayName || getScriptName(script)) |
| 64 | .replace(BAD_URL_CHAR, replaceWithFullWidthForm)) |
| 65 | }.user.js#${ |
| 66 | script.props.id |
| 67 | }`; |
| 68 | } |
| 69 | |
| 70 | export function getScriptsTags(scripts) { |
| 71 | // Collecting all tag arrays in a simple index |
no test coverage detected