-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/sjcl variable #8099
Fix/sjcl variable #8099
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@linonetwo, I've committed a programmer sin; I just opened a PR for this fix without checking that anyone else already had. I just assumed that nobody else would have noticed this problem than me, the Uglify maker. I actually think your fix is better, so I'll close my PR and vouch for yours. |
Thanks @linonetwo I think it would be better for backwards compatibility to move sjcl.js back into |
I was about to write tiddlywiki galgame plugin today, but I think about it, if this PR only takes 5 min to refactor, then I should tend to this. |
Thanks @linonetwo much appreciated |
@Jermolene -- This PR breaks the RSOD popup. I did test the following code with the latest master and it broke the popup See: screenshot
|
I forget to add style system tag to it, let me PR a quick fix. |
#8043 (comment) does not fix my problem, I get error
Can't create duplicate variable: 'A'
on iOS webview on TidGi mobile when init TW.And I find sjcl.js 's internal
this.A=xxx
leak to window, wherethis
iswindow
. And later it doesfunction A(){xxx}
, and cause error on iOS. See this on tw5-comIn this PR I wrap IIFE to sjcl.js by using
tiddlywiki.files
. (I have to move sjcl.js to/lib
, otherwisetiddlywiki.files
will preventboot.js
from loading, don't know why.)I also change sha256 to use
$tw.sjcl
, but this is not necessary, because we have to mount sjcl towindow.sjcl
before booting, when$tw
is not init yet. Unless we can init$tw = {}
before library.