Rename service worker script to avoid being blocked by uBlock

This commit is contained in:
Frédéric Guillot 2020-09-23 20:20:31 -07:00
parent eb026ae4ac
commit 75b11d5744
6 changed files with 10 additions and 10 deletions

View file

@ -194,8 +194,8 @@ func main() {
"ui/static/js/app.js",
"ui/static/js/bootstrap.js",
},
"sw": []string{
"ui/static/js/sw.js",
"service-worker": []string{
"ui/static/js/service_worker.js",
},
}, map[string]string{
"app": "(function(){'use strict';",

View file

@ -351,7 +351,7 @@ SOFTWARE.
{{ end }}{{ end }}
<script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>
<script type="text/javascript" src="{{ route "javascript" "name" "sw" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
<script type="text/javascript" src="{{ route "javascript" "name" "service-worker" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
</head>
<body
data-entries-status-url="{{ route "updateEntriesStatus" }}"
@ -523,7 +523,7 @@ var templateCommonMapChecksums = map[string]string{
"feed_menu": "318d8662dda5ca9dfc75b909c8461e79c86fb5082df1428f67aaf856f19f4b50",
"icons": "3dbe754a98f524a227111191d76b8c6944711b13613cc548ee9e9808fe0bffb4",
"item_meta": "8306adf3ef9966de3e3dc74ca1042e51d778b027ab8cf0a60a2e94a0115982dc",
"layout": "91d2ab3f683a2ced5e9ce5cd04919e74b3e3f329a5eedcc60015b8d49ecb1b77",
"layout": "e44dd40d22aec224b9f3d29391e21d4c066f8ecebbd3678a9b4832d014fffe65",
"pagination": "7b61288e86283c4cf0dc83bcbf8bf1c00c7cb29e60201c8c0b633b2450d2911f",
"settings_menu": "e2b777630c0efdbc529800303c01d6744ed3af80ec505ac5a5b3f99c9b989156",
}

View file

@ -40,7 +40,7 @@
{{ end }}{{ end }}
<script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>
<script type="text/javascript" src="{{ route "javascript" "name" "sw" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
<script type="text/javascript" src="{{ route "javascript" "name" "service-worker" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
</head>
<body
data-entries-status-url="{{ route "updateEntriesStatus" }}"

File diff suppressed because one or more lines are too long

View file

@ -42,6 +42,6 @@ func New(tpl *template.Engine, r *http.Request, sess *session.Session) *View {
b.params["theme"] = theme
b.params["theme_checksum"] = static.StylesheetsChecksums[theme]
b.params["app_js_checksum"] = static.JavascriptsChecksums["app"]
b.params["sw_js_checksum"] = static.JavascriptsChecksums["sw"]
b.params["sw_js_checksum"] = static.JavascriptsChecksums["service-worker"]
return b
}