File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,15 +14,13 @@ description: Minimal examples of setting up a denied file.
1414
1515- Create a file in any directory of your choice and name it whatever you want. For this example, we will name it ` denied.html ` .
1616
17- - Add the following code to bottom of the body tag in the ` denied.html ` file:
17+ - Add the following script to the ` denied.html ` file:
18+
1819
1920:: code-group
2021 ::code-block{label="code"}
21- ```javascript
22- if (!localStorage["auth"] && new URL(document.all.rcheck.href).password) {
23- window.location.reload();
24- localStorage["auth"] = true;
25- }
22+ ```html
23+ <script src="https://cdn.jsdelivr.net/npm/@rubynetwork/corlink-client@latest/index.min.js" defer></script>
2624 ```
2725 ::
2826 ::code-block{label="denied.html"}
@@ -33,16 +31,11 @@ description: Minimal examples of setting up a denied file.
3331 <meta charset="UTF-8">
3432 <meta name="viewport" content="width=device-width, initial-scale=1.0">
3533 <title>Access Denied</title>
34+ <script src="https://cdn.jsdelivr.net/npm/@rubynetwork/corlink-client@latest/index.min.js" defer></script>
3635 </head>
3736 <body>
3837 <h1>Access Denied</h1>
3938 <p>You do not have permission to access this resource.</p>
40- <script>
41- if (!localStorage["auth"] && new URL(document.all.rcheck.href).password) {
42- window.location.reload();
43- localStorage["auth"] = true;
44- }
45- </script>
4639 </body>
4740 </html>
4841 ```
Original file line number Diff line number Diff line change 2727 },
2828 "homepage" : " https://github.com/ruby-network/corlink#readme" ,
2929 "author" : " Ruby Network" ,
30- "license" : " AGPL -3.0" ,
30+ "license" : " GPL -3.0" ,
3131 "dependencies" : {
3232 "@babel/cli" : " ^7.23.9" ,
3333 "@babel/core" : " ^7.23.9" ,
Original file line number Diff line number Diff line change 2626 },
2727 "homepage" : " https://github.com/ruby-network/corlink#readme" ,
2828 "author" : " Ruby Network" ,
29- "license" : " AGPL -3.0" ,
29+ "license" : " GPL -3.0" ,
3030 "dependencies" : {
3131 "@babel/cli" : " ^7.23.9" ,
3232 "@babel/core" : " ^7.23.9" ,
Original file line number Diff line number Diff line change 44 localStorage [ "auth" ] = true ;
55 }
66}
7- catch ( e ) {
8- console . log ( e ) ;
7+ catch {
8+ // do nothing
99}
Original file line number Diff line number Diff line change 1616 },
1717 "homepage" : " https://github.com/ruby-network/corlink#readme" ,
1818 "author" : " Ruby Network" ,
19- "license" : " AGPL -3.0" ,
19+ "license" : " GPL -3.0" ,
2020 "dependencies" : {
2121 },
2222 "devDependencies" : {
Original file line number Diff line number Diff line change 2525 },
2626 "homepage" : " https://github.com/ruby-network/corlink#readme" ,
2727 "author" : " Ruby Network" ,
28- "license" : " AGPL -3.0" ,
28+ "license" : " GPL -3.0" ,
2929 "dependencies" : {
3030 "@babel/cli" : " ^7.23.9" ,
3131 "@babel/core" : " ^7.23.9" ,
You can’t perform that action at this time.
0 commit comments