logseq import plugin
This commit is contained in:
1 parent
3ae84ccdd7
commit
5af49655d6
11 files changed
+301
-193
No files matched your search
@@ -9,17 +9,22 @@
|
||||
|
||||
const hyprcrd = window.hyprcrd;
|
||||
|
||||
// Cache-bust the test modules so edits to test files are picked up without
|
||||
// a hard refresh. The browser treats each unique URL as a distinct module,
|
||||
// so a fresh query string on each page load forces re-import.
|
||||
const V = '?v=' + Date.now();
|
||||
|
||||
// Auto-load if ?test in query string
|
||||
if (new URLSearchParams(location.search).has('test')) {
|
||||
import('./tests.js');
|
||||
import('./tests.js' + V);
|
||||
}
|
||||
|
||||
// Keyboard shortcut: Ctrl+Shift+T → open runner
|
||||
document.addEventListener('keydown', e => {
|
||||
if (e.ctrlKey && e.shiftKey && e.key === 'T') {
|
||||
e.preventDefault();
|
||||
import('./tests.js').then(() =>
|
||||
import('./runner.js').then(m => m.open?.())
|
||||
import('./tests.js' + V).then(() =>
|
||||
import('./runner.js' + V).then(m => m.open?.())
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user