Libraryless. Click here for Pure Java version (2388L/15K).
1 | sS hJsMakeCookie() { |
2 | ret hjavascript([[ |
3 | var cookie = localStorage.getItem('cookie'); |
4 | var urlParams = new URLSearchParams(window.location.search); |
5 | console.log("cookie 1: " + cookie); |
6 | if (!cookie) { |
7 | cookie = Math.random().toString(36).substr(2, 9); |
8 | localStorage.setItem('cookie', cookie); |
9 | console.log("cookie 2: " + cookie); |
10 | } |
11 | ]]); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027639 |
Snippet name: | hJsMakeCookie |
Eternal ID of this version: | #1027639/2 |
Text MD5: | 6e2db546f42229fbf10fb019b821e1e8 |
Transpilation MD5: | ea4fb43c50cb68d749dc6decad611783 |
Author: | stefan |
Category: | javax / javascript |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-03-27 23:06:08 |
Source code size: | 384 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 247 / 339 |
Version history: | 1 change(s) |
Referenced in: | [show references] |