mirror of
https://github.com/ryanamay/pint.git
synced 2024-09-20 01:50:34 +00:00
cleanup: yeet old code
This commit is contained in:
parent
9ca308c5b6
commit
d88d729070
9 changed files with 0 additions and 231 deletions
|
@ -1,29 +0,0 @@
|
|||
let accent1 = "#ff0000";
|
||||
|
||||
const filter = {
|
||||
url: [{
|
||||
urlMatches: 'https://*.google.com/*',
|
||||
}, ],
|
||||
};
|
||||
|
||||
chrome.runtime.onInstalled.addListener(() => {
|
||||
chrome.storage.sync.set({
|
||||
a1: accent1
|
||||
});
|
||||
})
|
||||
|
||||
chrome.action.onClicked.addListener((tab) => {
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
files: ['popup.js']
|
||||
}, () => chrome.runtime.lastError);
|
||||
});
|
||||
|
||||
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tabId },
|
||||
files: ['initial.js']
|
||||
}, () => chrome.runtime.lastError);
|
||||
});
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Gitccentify",
|
||||
"version": "1.1",
|
||||
|
||||
"action": {
|
||||
"default_icon": {
|
||||
"16": "images/icon16.png",
|
||||
"24": "images/icon24.png",
|
||||
"32": "images/icon32.png"
|
||||
},
|
||||
"default_title": "Gitccentify",
|
||||
|
||||
"default_popup": "popup.html"
|
||||
|
||||
},
|
||||
|
||||
"description": "Personalize your Github Experience by theming it to your own style.",
|
||||
|
||||
"author": {
|
||||
"name": "Jariel Que",
|
||||
"url": "https://github.com/nafunii"
|
||||
},
|
||||
|
||||
"host_permissions": [
|
||||
"https://*.github.com/"
|
||||
],
|
||||
|
||||
"content_scripts": [{
|
||||
"run_at": "document_end",
|
||||
"matches": ["https://*.github.com/*"],
|
||||
"js": ["onload.js"]
|
||||
}],
|
||||
|
||||
"permissions": [
|
||||
"storage",
|
||||
"scripting"
|
||||
],
|
||||
"background": {
|
||||
"service_worker": "background.js"
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
chrome.storage.sync.get('a1', ({ a1 }) => {
|
||||
updateAccents(a1);
|
||||
|
||||
// run a second check to update missing accents due to limitations
|
||||
setTimeout(function() {
|
||||
updateAccents(a1);
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
|
||||
let r = document.querySelector(':root');
|
||||
|
||||
function updateAccents(a1) {
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L4-bg', a1 + "ff", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L3-bg', a1 + "c5", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L2-bg', a1 + "8a", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L1-bg', a1 + "54", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-accent-emphasis', a1 + "ff", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-bg', a1 + "ff", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-hover-bg', a1 + "c5", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-active-bg', a1 + "8a", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-focus-bg', a1 + "8a", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-disabled-bg', a1 + "54", "important");
|
||||
document.querySelector('.js-highlight-blob').style.setProperty('fill', a1 + "c5", "important");
|
||||
document.querySelector('.js-highlight-blob').style.setProperty('stroke', a1 + "ff", "important");
|
||||
for (let i = 0; i < document.querySelectorAll('.Progress-item.rounded-2').length; i++) {
|
||||
document.querySelectorAll('.Progress-item.rounded-2')[i].style.setProperty('background-color', a1 + "ff", "important");
|
||||
}
|
||||
}
|
||||
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tabId },
|
||||
files: ['initial.js']
|
||||
}, () => chrome.runtime.lastError);
|
||||
});
|
|
@ -1,40 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- My Styles -->
|
||||
<link rel="stylesheet" href="styles/styles.css">
|
||||
|
||||
<title>Gitccentify</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="title">
|
||||
<p align="center">
|
||||
<img width="50" src="images/icon32.png" alt="Logo">
|
||||
<br> · Gitccentify ·
|
||||
<br> v1.0.0</p>
|
||||
</p>
|
||||
<hr>
|
||||
</div>
|
||||
<form>
|
||||
<div class="vertcenter">
|
||||
<label for="accent" class="inb">Select Your Accent Color:</label>
|
||||
<input class="getColor" type="color" name="accent-color" id="accent">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
38
old/popup.js
38
old/popup.js
|
@ -1,38 +0,0 @@
|
|||
let changeColor = document.getElementById("accent");
|
||||
|
||||
chrome.storage.sync.get("a1", ({ a1 }) => {
|
||||
changeColor.value = a1;
|
||||
});
|
||||
|
||||
changeColor.addEventListener("change", async() => {
|
||||
let [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
|
||||
var accent1 = changeColor.value;
|
||||
chrome.storage.sync.set({ a1: accent1 });
|
||||
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
function: setAccent,
|
||||
});
|
||||
})
|
||||
|
||||
function setAccent() {
|
||||
chrome.storage.sync.get('a1', ({ a1 }) => {
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L4-bg', a1 + "ff", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L3-bg', a1 + "c5", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L2-bg', a1 + "8a", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L1-bg', a1 + "54", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-accent-emphasis', a1 + "ff", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-bg', a1 + "ff", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-hover-bg', a1 + "c5", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-active-bg', a1 + "8a", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-focus-bg', a1 + "8a", "important");
|
||||
document.querySelector(':root').style.setProperty('--color-btn-primary-disabled-bg', a1 + "54", "important");
|
||||
document.querySelector('.js-highlight-blob').style.setProperty('fill', a1 + "c5", "important");
|
||||
document.querySelector('.js-highlight-blob').style.setProperty('stroke', a1 + "ff", "important");
|
||||
for (let i = 0; i < document.querySelectorAll('.Progress-item.rounded-2').length; i++) {
|
||||
document.querySelectorAll('.Progress-item.rounded-2')[i].style.setProperty('background-color', a1 + "ff", "important");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/* Elements */
|
||||
|
||||
* {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#title {
|
||||
height: 80px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
width: 300px;
|
||||
position: relative;
|
||||
padding: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 64px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
/* Generics */
|
||||
|
||||
.inb {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.getColor {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
outline: none;
|
||||
margin: 10px;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.vertcenter {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
Loading…
Reference in a new issue