Comments (2)
I asked ChatGPT
Why does changing
// @run-at document-start
to// @run-at document-end
fix a ViolentMonkey script and get rid of thedocument.head is null
error?
and got the answer:
The
@run-at
metadata block in a ViolentMonkey script specifies when the script should be executed. If the script is set to run atdocument-start
, it will be executed as soon as possible, before the document's content (including the<head>
element) has been loaded. This can cause problems if the script tries to access or modify the<head>
element, because it won't exist yet.On the other hand, if the
@run-at
metadata is set todocument-end
, the script will be executed after the document's content (including the<head>
element) has been loaded. This allows the script to safely access and modify the<head>
element, because it will exist by the time the script runs.In summary, changing the
@run-at
metadata fromdocument-start
todocument-end
can fix thedocument.head is null
error because it ensures that the script is executed after the<head>
element has been loaded, so that the script can safely access and modify it.
A similar explanation is provided in greasemonkey/greasemonkey#2515.
from chatgpt-exporter.
Replacing
// @run-at document-start
with
// @run-at document-end
seems to fix the issue.
from chatgpt-exporter.
Related Issues (20)
- help: How to get chatGPT QA-list? (like previous vscode-chatgpt) HOT 9
- feat: compatible with Better ChatGPT
- Overlapping HOT 1
- "Export" button is on top of the "Settings" button HOT 4
- Broken view on share links (mobile) HOT 8
- Help on creating exporter for chat.nbox.ai and other service HOT 3
- Exports with plugin didn't choose the right node to display HOT 17
- Support image (multi-modal) input
- Improve foot notes output in HTML export
- HTML export doesn't follow the user's chain of prompts HOT 3
- Screenshot is failing on the new UI HOT 2
- Dalle's response should be merged into chatgpt's response
- Not exporting the entire chat HOT 7
- Support mathematical formula HOT 5
- Export is using the wrong conversation choice HOT 26
- Image in execution output is not being rendered
- chat.zhile.io 升级成为pandoar-next,现在后端的API是和官方一样的,但是当我把接口改成正确的之后却无法获取有效的accesstoken,导致下载文件失败 HOT 7
- 为什么选择油猴插件而不是谷歌浏览器插件的形式呢? HOT 1
- export with code in analysis HOT 5
- Add `Archive` button to Export Conversations dialog HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-exporter.