mirror of
https://github.com/ryanamay/pint.git
synced 2024-09-20 01:50:34 +00:00
Restyled by prettier
This commit is contained in:
parent
0d4daa23e9
commit
4acd1261c7
8 changed files with 8621 additions and 6389 deletions
|
@ -166,8 +166,7 @@ defaultColorScheme = {
|
|||
__color_select_menu_backdrop_border: "#484f58",
|
||||
__color_select_menu_tap_highlight: "rgba(48, 54, 61, 0.5)",
|
||||
__color_select_menu_tap_focus_bg: "#0c2d6b",
|
||||
__color_overlay_shadow :
|
||||
"0 0 0 1px #30363d, 0 16px 32px rgba(1, 4, 9, 0.85)",
|
||||
__color_overlay_shadow: "0 0 0 1px #30363d, 0 16px 32px rgba(1, 4, 9, 0.85)",
|
||||
__color_header_text: "rgba(255, 255, 255, 0.7)",
|
||||
__color_header_bg: "#161b22",
|
||||
__color_header_divider: "#8b949e",
|
||||
|
@ -471,18 +470,26 @@ colorSettings.forEach((colorSetting) => {
|
|||
const colorSettingPersist = colorSetting;
|
||||
chrome.storage.local.get([`${colorSetting}`], function (result) {
|
||||
if (result[colorSetting] === undefined) {
|
||||
console.log(`Key not In Place - ${colorSettingVar}: Defaulting ${
|
||||
defaultColorScheme[colorSettingPersist]}`);
|
||||
console.log(
|
||||
`Key not In Place - ${colorSettingVar}: Defaulting ${defaultColorScheme[colorSettingPersist]}`
|
||||
);
|
||||
const key = {};
|
||||
key[`${colorSetting}`] = defaultColorScheme[colorSetting];
|
||||
chrome.storage.local.set(key);
|
||||
document.documentElement.style.setProperty(
|
||||
`${colorSettingVar}`, defaultColorScheme[colorSettingPersist],
|
||||
"important");
|
||||
`${colorSettingVar}`,
|
||||
defaultColorScheme[colorSettingPersist],
|
||||
"important"
|
||||
);
|
||||
} else {
|
||||
console.log(`Setting ${colorSettingVar}: ${result[colorSetting]}`);
|
||||
document.querySelector(":root").style.setProperty(
|
||||
`${colorSettingVar}`, `${result[colorSetting]}`, "important");
|
||||
document
|
||||
.querySelector(":root")
|
||||
.style.setProperty(
|
||||
`${colorSettingVar}`,
|
||||
`${result[colorSetting]}`,
|
||||
"important"
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -283,8 +283,7 @@ defaultColorScheme = {
|
|||
__color_open_fg: "#3fb950",
|
||||
__color_open_muted: "rgba(46, 160, 67, 0.4)",
|
||||
__color_open_subtle: "rgba(46, 160, 67, 0.15)",
|
||||
__color_overlay_shadow :
|
||||
"0 0 0 1px #30363d, 0 16px 32px rgba(1, 4, 9, 0.85)",
|
||||
__color_overlay_shadow: "0 0 0 1px #30363d, 0 16px 32px rgba(1, 4, 9, 0.85)",
|
||||
__color_page_header_bg: "#0d1117",
|
||||
__color_prettylights_syntax_brackethighlighter_angle: "#8b949e",
|
||||
__color_prettylights_syntax_brackethighlighter_unmatched: "#f85149",
|
||||
|
@ -479,9 +478,11 @@ chrome.runtime.onInstalled.addListener(() => {
|
|||
});
|
||||
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
chrome.scripting.executeScript({
|
||||
chrome.scripting.executeScript(
|
||||
{
|
||||
target: { tabId },
|
||||
files: ["initial.js"],
|
||||
},
|
||||
() => chrome.runtime.lastError);
|
||||
() => chrome.runtime.lastError
|
||||
);
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
4066
public/pint-newinstall/assets/js/jquery.min.js
vendored
4066
public/pint-newinstall/assets/js/jquery.min.js
vendored
File diff suppressed because it is too large
Load diff
30
public/pint-newinstall/assets/js/script.min.js
vendored
30
public/pint-newinstall/assets/js/script.min.js
vendored
|
@ -5,9 +5,11 @@
|
|||
var n = function () {
|
||||
(void 0 !== window.pageYOffset
|
||||
? window.pageYOffset
|
||||
: (document.documentElement || document.body.parentNode ||
|
||||
document.body)
|
||||
.scrollTop) > 100
|
||||
: (
|
||||
document.documentElement ||
|
||||
document.body.parentNode ||
|
||||
document.body
|
||||
).scrollTop) > 100
|
||||
? e.classList.add("navbar-shrink")
|
||||
: e.classList.remove("navbar-shrink");
|
||||
};
|
||||
|
@ -16,30 +18,36 @@
|
|||
document.getElementsByClassName("popup-gallery").length > 0 &&
|
||||
baguetteBox.run(".popup-gallery", { animation: "slideIn" }),
|
||||
(function () {
|
||||
if ("requestAnimationFrame" in window &&
|
||||
!/Mobile|Android/.test(navigator.userAgent)) {
|
||||
if (
|
||||
"requestAnimationFrame" in window &&
|
||||
!/Mobile|Android/.test(navigator.userAgent)
|
||||
) {
|
||||
var e = document.querySelectorAll("[data-bss-parallax]");
|
||||
if (e.length) {
|
||||
var n, t = [];
|
||||
var n,
|
||||
t = [];
|
||||
window.addEventListener("scroll", a),
|
||||
window.addEventListener("resize", a), a();
|
||||
window.addEventListener("resize", a),
|
||||
a();
|
||||
}
|
||||
}
|
||||
function a() {
|
||||
t.length = 0;
|
||||
for (var a = 0; a < e.length; a++) {
|
||||
var r = e[a].getBoundingClientRect(),
|
||||
i = parseFloat(e[a].getAttribute("data-bss-parallax-speed"),
|
||||
10) ||
|
||||
i =
|
||||
parseFloat(e[a].getAttribute("data-bss-parallax-speed"), 10) ||
|
||||
0.5;
|
||||
r.bottom > 0 && r.top < window.innerHeight &&
|
||||
r.bottom > 0 &&
|
||||
r.top < window.innerHeight &&
|
||||
t.push({ speed: i, node: e[a] });
|
||||
}
|
||||
cancelAnimationFrame(n), t.length && (n = requestAnimationFrame(o));
|
||||
}
|
||||
function o() {
|
||||
for (var e = 0; e < t.length; e++) {
|
||||
var n = t[e].node, a = t[e].speed;
|
||||
var n = t[e].node,
|
||||
a = t[e].speed;
|
||||
n.style.transform =
|
||||
"translate3d(0, " + -window.scrollY * a + "px, 0)";
|
||||
}
|
||||
|
|
|
@ -538,8 +538,7 @@ export var cg69_bd561d = [
|
|||
];
|
||||
|
||||
// color group: 70 | default color: #bf4b8a
|
||||
export var cg70_bf4b8a =
|
||||
[ "__color_scale_pink_5", "__color_sponsors_emphasis" ];
|
||||
export var cg70_bf4b8a = ["__color_scale_pink_5", "__color_sponsors_emphasis"];
|
||||
|
||||
// color group: 71 | default color: #c9d1d9
|
||||
export var cg71_c9d1d9 = [
|
||||
|
|
|
@ -167,11 +167,14 @@ export function updateCalendar(color, saturate, scale) {
|
|||
}
|
||||
|
||||
for (let i = 0; i < scale.length; i++) {
|
||||
updateMultiple(scale[i], chroma(color)
|
||||
updateMultiple(
|
||||
scale[i],
|
||||
chroma(color)
|
||||
.brighten(3)
|
||||
.saturate(saturate)
|
||||
.alpha((i + 1) * 0.2)
|
||||
.hex());
|
||||
.hex()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,16 +197,22 @@ export function updateSpecific(color, desaturate, saturate, scale) {
|
|||
|
||||
for (let i = 0; i < scale.length; i++) {
|
||||
/^\d/.test(color.slice(-4))
|
||||
? updateMultiple(scale[i], chroma(color)
|
||||
? updateMultiple(
|
||||
scale[i],
|
||||
chroma(color)
|
||||
.brighten(i * 0.4)
|
||||
.saturate(saturate)
|
||||
.desaturate(desaturate)
|
||||
.hex())
|
||||
: updateMultiple(scale[i], chroma(color)
|
||||
.hex()
|
||||
)
|
||||
: updateMultiple(
|
||||
scale[i],
|
||||
chroma(color)
|
||||
.darken(i * 0.4)
|
||||
.saturate(saturate)
|
||||
.desaturate(desaturate)
|
||||
.hex());
|
||||
.hex()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +245,15 @@ export function generateSaturation(color, setting) {
|
|||
const colors = [];
|
||||
for (let i = 0; i < 10; i++) {
|
||||
/^\d/.test(color.slice(-4))
|
||||
? colors.push(chroma(color).darken(i * 0.4).hex())
|
||||
: colors.push(chroma(color).brighten(i * 0.4).hex());
|
||||
? colors.push(
|
||||
chroma(color)
|
||||
.darken(i * 0.4)
|
||||
.hex()
|
||||
)
|
||||
: colors.push(
|
||||
chroma(color)
|
||||
.brighten(i * 0.4)
|
||||
.hex()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,9 @@ export function pintSetNoReload(setting, value) {
|
|||
* @param {string} setting - get this setting
|
||||
*/
|
||||
export function pintGetUpdate(setting, func) {
|
||||
chrome.storage.local.get([ `${setting}` ],
|
||||
function(result) { func(result[`${setting}`]); });
|
||||
chrome.storage.local.get([`${setting}`], function (result) {
|
||||
func(result[`${setting}`]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue