rip-lang 3.13.88 → 3.13.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/docs/dist/rip.js +30 -6
- package/docs/dist/rip.min.js +34 -34
- package/docs/dist/rip.min.js.br +0 -0
- package/package.json +1 -1
- package/src/browser.js +3 -0
package/docs/dist/rip.min.js.br
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/browser.js
CHANGED
|
@@ -197,12 +197,15 @@ async function processRipScripts() {
|
|
|
197
197
|
es.addEventListener('reload', (e) => {
|
|
198
198
|
if (e.data === 'styles') {
|
|
199
199
|
const t = Date.now();
|
|
200
|
+
let refreshed = 0;
|
|
200
201
|
document.querySelectorAll('link[rel="stylesheet"]').forEach(l => {
|
|
201
202
|
if (new URL(l.href).origin !== location.origin) return;
|
|
202
203
|
const url = new URL(l.href);
|
|
203
204
|
url.searchParams.set('_r', t);
|
|
204
205
|
l.href = url.toString();
|
|
206
|
+
refreshed++;
|
|
205
207
|
});
|
|
208
|
+
if (!refreshed) location.reload();
|
|
206
209
|
} else {
|
|
207
210
|
location.reload();
|
|
208
211
|
}
|