Skip to content
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

Upgrade jQuery in Heliosbooth and Heliosverifier #395

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
recompress heliosbooth JS libraries
Could install but not run 'uglify' (doesn't seems to be maintained).
But looking at the source code, 'uglify' seems to call
'grunt-contrib-uglify' which in turn calls 'uglifyjs'. From grunt
docs: "will compress and mangle the input files using the default
[uglifyjs] options". So, we can use that last package directly, to
compress (-c) and mangle (-m):

$ uglifyjs <input files> -o <compressed.js> -c -m
reserved=['jQuery','$']

This last options tells it not to mangle jQuery.

Docs:
https://github.com/nanjingboy/uglify
https://www.npmjs.com/package/grunt-contrib-uglify
https://www.npmjs.com/package/uglify-js
laoumh committed Oct 8, 2024
commit 384715a1c8a80f13a0dc60294383e68493d295b7
2 changes: 1 addition & 1 deletion heliosbooth/build-helios-booth-compressed.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
uglify -s js/jscrypto/class.js,js/jscrypto/bigint.dummy.js,js/jscrypto/jsbn.js,js/jscrypto/jsbn2.js,js/jscrypto/sjcl.js,js/underscore-min.js,js/jquery-1.2.6.min.js,js/jquery.query-2.1.5.js,js/jquery-jtemplates.js,js/jquery.json.min.js,js/jscrypto/bigint.js,js/jscrypto/random.js,js/jscrypto/elgamal.js,js/jscrypto/sha1.js,js/jscrypto/sha2.js,js/jscrypto/helios.js -o js/20160507-helios-booth-compressed.js
uglifyjs js/jscrypto/class.js js/jscrypto/bigint.dummy.js js/jscrypto/jsbn.js js/jscrypto/jsbn2.js js/jscrypto/sjcl.js js/underscore-min.js js/jquery-3.7.1.min.js js/jscrypto/bigint.js js/jscrypto/random.js js/jscrypto/elgamal.js js/jscrypto/sha1.js js/jscrypto/sha2.js js/jscrypto/helios.js -o js/20241001-helios-booth-compressed.js -m reserved=['jQuery','$'] -c
1 change: 1 addition & 0 deletions heliosbooth/js/20241001-helios-booth-compressed.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions heliosbooth/vote.html
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="css/booth.css" />
<link rel="stylesheet" type="text/css" href="css/forms.css" />

<!-- -->
<!--
<script language="javascript" src="js/jscrypto/class.js"></script>
<script language="javascript" src="js/jscrypto/bigint.dummy.js"></script>
<script language="javascript" src="js/jscrypto/jsbn.js"></script>
@@ -20,9 +20,9 @@
<script language="javascript" src="js/jscrypto/elgamal.js"></script>
<script language="javascript" src="js/jscrypto/sha1.js"></script>
<script language="javascript" src="js/jscrypto/sha2.js"></script>
<script language="javascript" src="js/jscrypto/helios.js"></script>
<script language="javascript" src="js/jscrypto/helios.js"></script>-->

<!--<script language="javascript" src="js/20160507-helios-booth-compressed.js"></script>-->
<script language="javascript" src="js/20241001-helios-booth-compressed.js"></script>
</head>

<body>