@total_onion/onion-modalcontroller 1.0.0 → 1.0.2
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.
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to NPM when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
branches:
|
|
10
|
+
- master
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v2
|
|
17
|
+
- uses: actions/setup-node@v2
|
|
18
|
+
with:
|
|
19
|
+
node-version: 22
|
|
20
|
+
- run: npm ci
|
|
21
|
+
|
|
22
|
+
publish-npm:
|
|
23
|
+
needs: build
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v2
|
|
27
|
+
- uses: actions/setup-node@v2
|
|
28
|
+
with:
|
|
29
|
+
node-version: 22
|
|
30
|
+
registry-url: https://registry.npmjs.org/
|
|
31
|
+
- run: npm ci
|
|
32
|
+
- run: npm publish
|
|
33
|
+
env:
|
|
34
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/onion-modalcontroller.js
CHANGED
|
@@ -40,12 +40,16 @@ export default class modalController {
|
|
|
40
40
|
let modalPopup = document.getElementById("modal-controller-popup");
|
|
41
41
|
if (!modalPopup) {
|
|
42
42
|
const modalPopupHtml = `<div class="modal-controller-popup" id="modal-controller-popup">
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
<div class="modal-controller-popup__container">
|
|
44
|
+
<span class="modal-controller-popup__close-btn" id="modal-controller-popup__close-btn">×</span>
|
|
45
|
+
<div class="modal-controller-popup__content"></div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>`;
|
|
48
48
|
document.body.insertAdjacentHTML("beforeend", modalPopupHtml);
|
|
49
|
+
modalPopup = document.getElementById("modal-controller-popup");
|
|
50
|
+
}
|
|
51
|
+
if (!modalPopup) {
|
|
52
|
+
return;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
const popupContent = document.querySelector(
|