31 lines
657 B
CoffeeScript
31 lines
657 B
CoffeeScript
### DisKort
|
|
# (c) Er2 2022
|
|
# Zlib License
|
|
###
|
|
|
|
### Base URL
|
|
# Source code is here: https://gitdab.com/er2/diskort
|
|
# / at end is required
|
|
###
|
|
base = 'https://raw.githubusercontent.com/Er2ch/diskort/main/'
|
|
|
|
inject = ->
|
|
# inject webpack reader
|
|
s = document.createElement 'script'
|
|
s.setAttribute 'type', 'text/javascript'
|
|
s.setAttribute 'src', chrome.extension.getURL 'js/webpack.js'
|
|
document.head.appendChild s
|
|
|
|
# inject style
|
|
try
|
|
resp = await fetch base + 'btfl.css'
|
|
text = await resp.text()
|
|
s = document.createElement 'style'
|
|
s.innerHTML = text
|
|
document.head.appendChild s
|
|
catch e
|
|
console.error e
|
|
|
|
# Call it!
|
|
inject()
|