incremental-reading
incremental-reading copied to clipboard
Invalid HTML on card: SecurityError: Failed to execute 'insertRule' on 'CSSStyleSheet': Cannot access StyleSheet to insertRule
Hei there!
I downloaded the Incremental Reading add-on (v4103). I was trying to follow the instructions under the usage in the README file. I added a link but when I open up the deck I end up with the below error message.

I could reproduce this by
- Copy
https://en.wikipedia.org/wiki/Incremental_reading
- Then paste it in after
Alt
+3
. - Open the deck
I am running Anki:
Version 2.1.36 (53a984ba)
Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
On macOS v10.15.7 (19H2).
Thanks.
I have exactly the same issue. Did you manage to fix it?
No, let us know if you figure it out.
Thanks!
Mit freundlichen Grüßen
Alexander Alemayhu
YouTube: http://youtube.com/c/alexanderalemayhu http://youtube.com/c/alexanderalemayhu Twitch: http://twitch.tv/alexanderalemayhu http://twitch.tv/alemayhu Twitter: https://twitter.com/aalemayhu https://twitter.com/aalemayhu
On 25 Dec 2020, at 12:41 AM, uuuser-name [email protected] wrote:
I have exactly the same issue. Did you manage to fix it?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/luoliyan/incremental-reading/issues/113#issuecomment-751130882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHB25FZOHEYRK6PQH67R6DSWPGT5ANCNFSM4TFX3SDQ.
I think you can fix this issue by commenting out the javascript in the width.js file
// if (screen.width > {maxWidth}) {{
// var styleSheet = document.styleSheets[0];
// styleSheet.insertRule(
// "div {{ width: {maxWidth}px; margin: 20px auto }}", 0
// );
// }}
https://github.com/luoliyan/incremental-reading/blob/master/ir/web/width.js
I think you can fix this issue by commenting out the javascript in the width.js file
// if (screen.width > {maxWidth}) {{ // var styleSheet = document.styleSheets[0]; // styleSheet.insertRule( // "div {{ width: {maxWidth}px; margin: 20px auto }}", 0 // ); // }}
https://github.com/luoliyan/incremental-reading/blob/master/ir/web/width.js
This worked for me. Thanks!
I think you can fix this issue by commenting out the javascript in the width.js file
// if (screen.width > {maxWidth}) {{ // var styleSheet = document.styleSheets[0]; // styleSheet.insertRule( // "div {{ width: {maxWidth}px; margin: 20px auto }}", 0 // ); // }}
https://github.com/luoliyan/incremental-reading/blob/master/ir/web/width.js
It worked for me as well. Thanks a lot!
I'm trying it now and cannot reproduce.
My system info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 11.6.2
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-10-09 10:19:20
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Incremental Reading v4113 unofficial clone ['999215520', 2022-09-27T16:32, 'None', '']
===IDs of active AnkiWeb add-ons===
999215520
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])