Script Shelf
The old cut-and-paste scripts from the original library: what happened to them, what replaced them, and whether old snippets still run.
Threads in Script Shelf
- ✓
Why does an old script throw errors in a modern browser?
An old script usually throws errors in a modern browser for one of five reasons: it runs before its elements exist, needs a library that is not loaded, calls...
1reply - ✓
How do you replace an old popup window script with a dialog?
To replace an old window.open() popup, put the content in a element on the same page and open it with showModal() from a click on a real link or button. Close...
1reply - ✓
Why do old scripts use document.write, and what replaces it?
Old scripts use document.write() because it was the simplest way to put content into a page while it loaded: one line, no element to find. It is now...
1reply - ✓
How do you modernise an old cut-and-paste JavaScript script?
To modernise an old cut-and-paste JavaScript script, move it into its own file loaded with defer, replace inline onclick and onload attributes with...
1reply - ✓
How do you replace an old slideshow script with CSS scroll snap?
Put the slides side by side in a horizontally scrolling container, add scroll-snap-type: x mandatory to the container and scroll-snap-align: start to each...
2replies - ✓
Do old cut-and-paste scripts still work in current browsers?
Some run unchanged, many half work, and a few fail without any error on screen. Plain DOM code usually still runs. What breaks is code that relied on things...
2replies - ✓
Is it safe to paste a script from an old tutorial site?
Reading it is safe, pasting it unchanged is a manageable risk, and linking to the copy on the old site is the real danger. Copy the code into your own file...
2replies - ✓
What happened to the old image rollover script?
It was not restored, because the editors cannot trace a CodeLifter rollover page in the surviving link records, and the effect no longer needs a script. Two...
2replies