Skip to content

Commit 8b5d64d

Browse files
fix q
1 parent 26337bb commit 8b5d64d

File tree

7 files changed

+1042
-2748
lines changed

7 files changed

+1042
-2748
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ window.doace();
178178
</script>
179179
180180
<script>
181-
if (!Array.isArray(window.allLoaded)) {
181+
if (typeof window.allLoaded === 'undefined') {
182182
window.allLoaded = [];
183183
}
184184
window.allLoaded.push(function () {

js/github.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -498,14 +498,14 @@ body .github-profile:hover {
498498

499499
window.githubJsReady = true;
500500

501-
if (Array.isArray(window.allLoaded)) {
502-
const preexisting = window.allLoaded;
503-
window.allLoaded = {
504-
push: function (trigger) {
505-
console.log("Internal: run my function");
506-
trigger();
507-
},
508-
};
501+
const preexisting = window.allLoaded;
502+
window.allLoaded = {
503+
push: function (trigger) {
504+
console.log("Internal: run my function");
505+
trigger();
506+
},
507+
};
508+
if (Array.isArray(preexisting)) {
509509
preexisting.forEach(function (trigger) {
510510
window.allLoaded.push(trigger);
511511
});

js/template.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import getGlobal from "./getGlobal.js";
33
* from: https://github.com/stopsopa/nlab/blob/master/src/template.js
44
*/
55

6-
var template = (function (t, delimiters) {
6+
export default (function (t, delimiters) {
77
// implementation from Underscore.js 1.8.3
88
var escapeMap = {
99
"&": "&amp;",
@@ -131,3 +131,5 @@ var template = (function (t, delimiters) {
131131
// interpolate: /<#=([\s\S]+?)#>/g,
132132
// escape: /<#-([\s\S]+?)#>/g,
133133
});
134+
135+

pages/bash/xx/xx.node.bundled.gitignored.cjs

Lines changed: 1022 additions & 2735 deletions
Large diffs are not rendered by default.

pages/js/popper/floating-ui-vanilla/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ <h2>Simple example</h2>
2828
<div class="example1 vanilla-tooltip">
2929
<!-- <script> -->
3030
<script type="editor" data-lang="js" data-eval>
31+
32+
import template from '/js/template.js'
33+
3134
// import {computePosition} from 'https://cdn.jsdelivr.net/npm/@floating-ui/[email protected]/+esm';
3235
const { computePosition, autoUpdate, flip, shift, limitShift, offset, autoPlacement, arrow } =
3336
FloatingUIDOM;
@@ -310,7 +313,7 @@ <h2>Simple example</h2>
310313
};
311314
})();
312315

313-
if (!Array.isArray(window.allLoaded)) {
316+
if (typeof window.allLoaded === 'undefined') {
314317
window.allLoaded = [];
315318
}
316319
window.allLoaded.push(async function () {

pages/js/popper/popover-react/popper.entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ function Main() {
330330
);
331331
}
332332

333-
if (!Array.isArray(window.allLoaded)) {
333+
if (typeof window.allLoaded === 'undefined') {
334334
window.allLoaded = [];
335335
}
336336
window.allLoaded.push(async function () {

pages/js/popper/popover-vanilla/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ <h2>Simple example</h2>
2626
<div class="example1 vanilla-tooltip">
2727
<!-- <script> -->
2828
<script type="editor" data-lang="js" data-eval>
29+
30+
import template from '/js/template.js'
2931
const setupTooltipGroup = (function () {
3032
const instances = {};
3133

@@ -284,7 +286,7 @@ <h2>Simple example</h2>
284286
};
285287
})();
286288

287-
if (!Array.isArray(window.allLoaded)) {
289+
if (typeof window.allLoaded === 'undefined') {
288290
window.allLoaded = [];
289291
}
290292
window.allLoaded.push(async function () {

0 commit comments

Comments
 (0)