fix moloco

yityu-patch-1
yityu 2024-12-09 18:08:19 +08:00
parent fd44a1c328
commit c9d1d5f056
3 changed files with 54 additions and 32 deletions

View File

@ -17,13 +17,6 @@ SoyooFacade.InstallGame()
<script src="facebook.js" charset="utf-8"></script> <script src="facebook.js" charset="utf-8"></script>
``` ```
## moloco
把`networks/moloco.js`复制到web-mobile目录下。
在w`web-mobile/index.html`的"</head>"的上一行添加代码
```
<script src="moloco.js" charset="utf-8"></script>
```
## google ## google
把`networks/google.js`复制到web-mobile目录下。 把`networks/google.js`复制到web-mobile目录下。
在w`web-mobile/index.html`的"</head>"的上一行添加代码 在w`web-mobile/index.html`的"</head>"的上一行添加代码
@ -60,9 +53,16 @@ SoyooFacade.InstallGame()
### applovin ### applovin
1. 把networks/mintegral.js 复制到web-mobile下 1. 把networks/mintegral.js 复制到web-mobile下
3. 编辑index.html在body最后加上 2. 编辑index.html在body最后加上
`<script src="mintegral.js" charset="utf-8"></script>` `<script src="mintegral.js" charset="utf-8"></script>`
### moloco
1. 把`networks/moloco.js`复制到web-mobile目录下。
2. 编辑index.html在body最后加上
```
<script src="moloco.js" charset="utf-8"></script>
```
## 打包 ## 打包
执行命令 `node single-html/build.js` 执行命令 `node single-html/build.js`
生成目标文件 `dist/index.html`即为目标文件 生成目标文件 `dist/index.html`即为目标文件

View File

@ -18,4 +18,19 @@ window.$soyooFacadeImpl = {
FbPlayableAd && FbPlayableAd.onCTAClick(); FbPlayableAd && FbPlayableAd.onCTAClick();
console.log("[SoyooFacadeImpl] onGameInstall") console.log("[SoyooFacadeImpl] onGameInstall")
} }
} }
!(function() {
let n = !1;
(window.gameStart = function() {
n
? window.resumeGame()
: ((n = !0), window.startGame());
}),
(window.gameClose = function() {
window.pauseGame();
}),
window.addEventListener("DOMContentLoaded", () => {
window.startGame()
})
})();

View File

@ -1,41 +1,48 @@
lockfileVersion: '9.0' lockfileVersion: '6.1'
settings: settings:
autoInstallPeers: true autoInstallPeers: true
excludeLinksFromLockfile: false excludeLinksFromLockfile: false
importers: dependencies:
brotli:
specifier: ^1.3.3
version: 1.3.3
.: devDependencies:
devDependencies: clean-css:
clean-css: specifier: ^5.3.3
specifier: ^5.3.3 version: 5.3.3
version: 5.3.3 uglify-js:
uglify-js: specifier: ^3.19.3
specifier: ^3.19.3 version: 3.19.3
version: 3.19.3
packages: packages:
clean-css@5.3.3: /base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
dev: false
/brotli@1.3.3:
resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==}
dependencies:
base64-js: 1.5.1
dev: false
/clean-css@5.3.3:
resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==}
engines: {node: '>= 10.0'} engines: {node: '>= 10.0'}
dependencies:
source-map: 0.6.1
dev: true
source-map@0.6.1: /source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true
uglify-js@3.19.3: /uglify-js@3.19.3:
resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==}
engines: {node: '>=0.8.0'} engines: {node: '>=0.8.0'}
hasBin: true hasBin: true
dev: true
snapshots:
clean-css@5.3.3:
dependencies:
source-map: 0.6.1
source-map@0.6.1: {}
uglify-js@3.19.3: {}