Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon731012 authored Jan 20, 2024
1 parent ba18c1e commit 76da4b3
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

<button id="rb">Restart Proxy</button>
<button id="data" onclick="gc();">Download Data</button>
<button id="set" onclick="document.getElementById('setinput').click();">Upload Data</button>
<input type="file" id="setinput" onchange="sc();" style="display:none;">

<style>
body{
Expand Down Expand Up @@ -119,12 +121,27 @@
font-size: 1em;
opacity: 1;
}

#sc{
position: absolute;
width: 15%;
height: 5%;
top: 69%;
right: 42.5%;
border-radius: 25px;
border: 2px solid white;
color: white;
background:transparent;
text-align: center;
font-size: 1em;
opacity: 1;
}

#data{
position: absolute;
width: 15%;
height: 5%;
top: 60%;
top: 63%;
right: 42.5%;
border-radius: 25px;
border: 2px solid white;
Expand Down Expand Up @@ -323,6 +340,24 @@
document.body.removeChild(element);
}

async function sc(){
var ultraviolet = new Ultraviolet(this.config);
const db = await ultraviolet.cookie.db();

var fileReader=new FileReader();

fileReader.onload=function(){

var filetext=fileReader.result;

}

fileReader.readAsText(document.getElementById("scinput").files[0]);


ultraviolet.cookie.setCookies(JSON.parse(filetext), db, ultraviolet.meta);
}

var fontsize1=2560/window.innerWidth*8;
url1.style.fontSize = fontsize1+"px";
var fontsize2=2560/window.innerWidth*8;
Expand Down

0 comments on commit 76da4b3

Please sign in to comment.