git init of winget repo statistics and manager
This commit is contained in:
239
public/mod.css
Normal file
239
public/mod.css
Normal file
@@ -0,0 +1,239 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Alef:wght@400;700&display=swap");
|
||||
|
||||
abbr {
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Alef";
|
||||
padding-left: 10px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
font-size: 14pt;
|
||||
width: 75%;
|
||||
background-color: #000000;
|
||||
background: #000000;
|
||||
color: #ffffff;
|
||||
height: 100vh;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
justify-content: center;
|
||||
}
|
||||
body.m{
|
||||
width: auto;
|
||||
}
|
||||
.copyme::before {
|
||||
content: "Click here to copy: ";
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.acopyme {
|
||||
direction: ltr;
|
||||
background: #6a568b;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
border-radius: 15px;
|
||||
/* margin-left: -10px; */
|
||||
transition: background 0.3s ease;
|
||||
padding: inherit;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.acopyme:hover {
|
||||
background: #7e7391;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.copyme {
|
||||
direction: ltr;
|
||||
background: #6a568b;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
border-radius: 15px;
|
||||
/* margin-left: -10px; */
|
||||
transition: background 0.3s ease;
|
||||
padding: inherit;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.copyme:hover {
|
||||
background: #7e7391;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
padding-left: 5px;
|
||||
background: inherit;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
ul.r {
|
||||
list-style-type: none;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
padding-right: 5px;
|
||||
margin-left: -20px;
|
||||
background: inherit;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 20px;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
background: inherit;
|
||||
padding: inherit;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
li:hover {
|
||||
background: #1a1a1a;
|
||||
border-color: #7e7391;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div {
|
||||
display: block;
|
||||
background-color: inherit;
|
||||
padding: inherit;
|
||||
width: inherit;
|
||||
color: inherit;
|
||||
background: inherit;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding-right: 40px;
|
||||
/* Adjust as needed */
|
||||
text-align: left;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
.container {
|
||||
overflow: hidden;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
margin: 20px;
|
||||
padding-bottom: 100%;
|
||||
margin-bottom: -100%;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
padding: inherit;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
align-content: inherit;
|
||||
text-align: inherit;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
.hiddencopy {
|
||||
background: #6a568b;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
border-radius: 15px;
|
||||
margin-left: 10px;
|
||||
transition: background 0.3s ease;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 18pt;
|
||||
}
|
||||
|
||||
li.clicked:hover {
|
||||
border-color: #3d3d3d;
|
||||
background: #635b72;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
direction: ltr;
|
||||
background: #6a568b;
|
||||
background-color: #6a568b;
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
height: inherit;
|
||||
width: 15%;
|
||||
/* margin-left: -10px; */
|
||||
transition: background 0.3s ease;
|
||||
padding: inherit;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: auto;
|
||||
width: 75%;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="file"] {
|
||||
background-color: #6a568b;
|
||||
border-color: #332150;
|
||||
color: #ffffff;
|
||||
width: 30%;
|
||||
border-radius: 15px;
|
||||
padding: auto;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.lang {
|
||||
position: fixed;
|
||||
float: inline-start;
|
||||
flex: auto;
|
||||
width: 100%;
|
||||
}
|
||||
#totalus {
|
||||
background-color: #6a568b;
|
||||
border-radius: 15px;
|
||||
}
|
118
public/script.js
Normal file
118
public/script.js
Normal file
@@ -0,0 +1,118 @@
|
||||
function copyValue(elementId) {
|
||||
/* Get the text field */
|
||||
var copyText = document.getElementById(elementId).innerText;
|
||||
|
||||
/* Create a temporary input field */
|
||||
var tempInput = document.createElement("input");
|
||||
tempInput.value = copyText;
|
||||
document.body.appendChild(tempInput);
|
||||
|
||||
/* Select the text field */
|
||||
tempInput.select();
|
||||
tempInput.setSelectionRange(0, 99999); /* For mobile devices */
|
||||
console.log(copyText);
|
||||
/* Copy the text inside the text field */
|
||||
navigator.clipboard.writeText(copyText);
|
||||
|
||||
/* Remove the temporary input field */
|
||||
document.body.removeChild(tempInput);
|
||||
|
||||
/* Show a toast message */
|
||||
var toast = document.createElement("div");
|
||||
toast.innerText = "Copied to clipboard!";
|
||||
toast.style.position = "fixed";
|
||||
toast.style.bottom = "20px";
|
||||
toast.style.left = "50%";
|
||||
toast.style.transform = "translateX(-50%)";
|
||||
toast.style.background = "#673AB7";
|
||||
toast.style.color = "#ffffff";
|
||||
toast.style.padding = "10px";
|
||||
toast.style.borderRadius = "5px";
|
||||
document.body.appendChild(toast);
|
||||
/* Remove the toast message after 3 seconds */
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(toast);
|
||||
}, 3000);
|
||||
}
|
||||
function showAndHide(elementId,liId){
|
||||
let element = document.getElementById(elementId);
|
||||
let li = document.getElementById(liId);
|
||||
element.classList.contains('hiddencopy')? element.classList.remove('hiddencopy'):element.classList.add('hiddencopy');
|
||||
element.classList.contains('hiddencopy')? li.classList.remove('clicked'):li.classList.add('clicked');
|
||||
}
|
||||
function replaceHebrew(elementId, stff){
|
||||
let element = document.getElementById(elementId);
|
||||
if (stff == 'Administrative staff'){
|
||||
element.innerText = "מותר לשימוש בידי צוות מנהלי";
|
||||
}
|
||||
else if(stff == 'Students')
|
||||
{
|
||||
element.innerText = "מותר לשימוש בידי סטודנטים";
|
||||
}
|
||||
}
|
||||
function insertWarning(elementId, before, lang="en"){
|
||||
if (elementId == true){
|
||||
if(lang == "he"){
|
||||
console.log('fuck');
|
||||
let elem = document.createElement("div");
|
||||
elem.id = "התראה";
|
||||
elem.innerText = "הבהרה: המסך החכם של מיקרוסופט ימנע את ריצת התוכנה. יש ללחוץ על פרטים נוספים -> אפשר";
|
||||
elem.style.color="#ffffff";
|
||||
let nodebefore = document.getElementById(before);
|
||||
nodebefore.insertBefore(elem, nodebefore.children[7])
|
||||
|
||||
}
|
||||
else{
|
||||
console.log('fuck');
|
||||
let elem = document.createElement("div");
|
||||
elem.id = "Warning";
|
||||
elem.innerText = "Warning: Has Microsoft SmartScreen blue window of block from running. Press more details -> Allow Running";
|
||||
elem.style.color="#ffffff";
|
||||
let nodebefore = document.getElementById(before);
|
||||
nodebefore.insertBefore(elem, nodebefore.children[7])
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
function downloadValue(elementId, filename){
|
||||
let text = document.getElementById(elementId).innerText;
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
||||
element.setAttribute('download', filename);
|
||||
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
|
||||
document.body.removeChild(element);
|
||||
|
||||
}
|
||||
function scriptPackage(rowid, extracommand, line){
|
||||
let text = `winget install ${rowid} -s huji`;
|
||||
console.log(extracommand)
|
||||
let fub = extracommand.indexOf(' &&')
|
||||
|
||||
console.log(`${rowid}, ${fub}`)
|
||||
console.log(`${rowid}, ${extracommand.length < 2}`)
|
||||
try{
|
||||
console.log(text)
|
||||
if(fub == 0){
|
||||
text += extracommand;
|
||||
}
|
||||
else if((extracommand.length > 2)){
|
||||
text = extracommand + " && " + text;
|
||||
}
|
||||
else if ((fub == -1))
|
||||
{
|
||||
text = text;
|
||||
}
|
||||
}
|
||||
catch{
|
||||
text = text;
|
||||
}
|
||||
document.getElementById(`id-${line}`).innerHTML = text;
|
||||
}
|
||||
function convertHtml(dt){
|
||||
return dt.replace("")
|
||||
}
|
Reference in New Issue
Block a user