Greasy Fork++

加入多種功能並改善Greasy Fork的體驗

< 腳本Greasy Fork++的回應

評論:OK - script works, but has bugs

§
發表於:2024-09-09

Uncaught (in promise) TypeError: n is null
ao install.js:41
oo install.js:28
no install.js:12
so install.js:8
fo install.js:144
fo install.js:143
B turbo.es2017-esm.js:455
notifyApplicationAfterPageLoad turbo.es2017-esm.js:5494
pageBecameInteractive turbo.es2017-esm.js:5385
pageIsInteractive turbo.es2017-esm.js:3476
pageIsComplete turbo.es2017-esm.js:3481
en turbo.es2017-esm.js:3469
start turbo.es2017-esm.js:3450
start turbo.es2017-esm.js:5151
er turbo.es2017-esm.js:5601
turbo.es2017-esm.js:6578

Sorry, Click install on search page doesn't work

§
發表於:2024-09-11
編輯:2024-09-11

I cannot reproduce the issue.

I guess it is related to the browser and userscript manager.

Please try other browsers to find out which browsers have this issue, which browsers do not have this issue.

And tell me the name of the userscript manager you are using.

§
發表於:2024-11-23
編輯:2024-11-23

I'm using violent monkey on firefox

§
發表於:2024-11-23

function installationHelpFunction(js) {
return async function showInstallationHelpJS(installLink) {
const { detect } = await import('detect-browser')
let browserType = detect().name
let modal = document.getElementById(js ? "installation-instructions-modal-js" : "installation-instructions-modal-css")
switch (browserType) {
case 'firefox':
case 'chrome':
case 'opera':
case 'safari':
modal.classList.add("installation-instructions-modal-" + browserType)
break;
default:
modal.classList.add("installation-instructions-modal-other")
}
let bypassLink = modal.querySelector(".installation-instructions-modal-content-bypass a")
bypassLink.setAttribute("href", installLink.getAttribute("href"))
return new Promise(resolve => {
bypassLink.addEventListener("click", function (event) {
resolve(true)
localStorage.setItem(js ? 'manualOverrideInstallJS' : 'manualOverrideInstallCSS', '1')
MicroModal.close(modal.id)
event.preventDefault()
})
MicroModal.show(modal.id, {
onClose: modal => resolve(false)
})
})
}
}

The line obtaining modal was null. causing the above exception

§
發表於:2024-11-23

Same situation on violent monkey on MS Edge

發表回覆

登入以回復