-
Notifications
You must be signed in to change notification settings - Fork 637
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
Generated Links #481
Comments
Could you describe in more detail what you are doing, that you need to modify values in the links? I have some javascript code that generates circuit links but it uses old-style links, which still work. |
We generate circuit with unique values for students in the class that we teach. Previously with the Falstad links, the values were just a component in the url that we could modify with a code script, but this seems to not be possible with the new urls as these are all letters.
If you have some code to generate these links that would be much appreciated.
…________________________________
From: Paul Falstad <notifications@github.com>
Sent: Tuesday, August 11, 2020 2:55:33 PM
To: sharpie7/circuitjs1 <circuitjs1@noreply.github.com>
Cc: Sam C <1234dvdff@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [sharpie7/circuitjs1] Generated Links (#481)
Could you describe in more detail what you are doing, that you need to modify values in the links? I have some javascript code that generates circuit links but it uses old-style links, which still work.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#481 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABXNNAT7YAPCQIO52NFCRQ3SADFMLANCNFSM4P2SJKEA>.
|
Well, if your existing code is generating circuits using old style links, it will still work. If you need to create new circuits that you can modify with a script, you can generate the old style links by doing File->Export As Text, then replacing all the spaces with "+" and URL encoding the rest (replacing newlines with %0A). Or, you could get the compression library we are using: https://github.com/pieroxy/lz-string/ And then do File->Export As Text, and compress the result using compressToEncodedURIComponent. Or take a new-style link, decompress it using decompressFromEncodedURIComponent, modify it and then compress it again. |
Thanks for your advice on this. We have been able to regenerate these links from the suggestions you provided above, by generating a link from the exported text.
Thanks again.
…________________________________
From: Paul Falstad <notifications@github.com>
Sent: Wednesday, August 12, 2020 4:06:24 AM
To: sharpie7/circuitjs1 <circuitjs1@noreply.github.com>
Cc: Sam C <1234dvdff@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [sharpie7/circuitjs1] Generated Links (#481)
Well, if your existing code is generating circuits using old style links, it will still work.
If you need to create new circuits that you can modify with a script, you can generate the old style links by doing File->Export As Text, then replacing all the spaces with "+" and URL encoding the rest (replacing newlines with %0A).
Or, you could get the compression library we are using: https://github.com/pieroxy/lz-string/ And then do File->Export As Text, and compress the result using compressToEncodedURIComponent. Or take a new-style link, decompress it using decompressFromEncodedURIComponent, modify it and then compress it again.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#481 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABXNNAR3XRQKFHMQUNOUMZTSAGCCBANCNFSM4P2SJKEA>.
|
The new form of generated links does not include values - which means it is not possible to update values from outside the browser.
The text was updated successfully, but these errors were encountered: