Skip to content

Commit

Permalink
0.1.7
Browse files Browse the repository at this point in the history
- Search menu fix
- Saves cards fix
- Logo color fix
  • Loading branch information
VitaliyMubarakov committed Sep 21, 2024
1 parent 5dff598 commit cf35496
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 33 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Pinterest Nuar | Dark Theme",
"description": "Pinterest | Material design",
"version": "0.1.6",
"version": "0.1.7",
"manifest_version": 3,
"icons": {
"16": "img/darkLogo.png",
Expand Down
70 changes: 44 additions & 26 deletions pint.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ InitStyles(
color: rgb(180, 180, 180) !important;
}`),
new CssStyle("", `
.lH1.dyH.iFc.H2s.R-d.O2T.zDA.IZT {
.lH1.dyH.iFc.H2s.R-d.O2T.zDA.IZT {
color: rgb(180, 180, 180) !important;
}`),
new CssStyle("", `
Expand Down Expand Up @@ -100,10 +100,26 @@ InitStyles(
new CssStyle("", `
.lH1.dyH.iFc.H2s.bwj.O2T.zDA.IZT.CKL {
color: white;
}`),
new CssStyle("Имена авторов", `
.hs0.ujU.un8.C9i.TB_ > .zI7.iyn.Hsu:first-child > :first-child[data-test-id="pinrep-footer"] {
display: none;
}`),
new CssStyle("Logo", `
.g_1.gUZ.U9O.kVc {
color: #b4b4b4;
}`),
new CssStyle("Меню поиска", `
[data-test-id="typeaheadResults"] {
background-color: #272727 !important;
}`),
new CssStyle("названия сейвов", `
.lH1.dyH.iFc.H2s.bwj.X8m.zDA.IZT.CKL {
color: #ffffff !important;
}`)
);

chrome.storage.sync.set({ isTurn: true });
//chrome.storage.sync.set({ isTurn: true });
var firstTimeStylesStringData;

function InitStyles(...styles) {
Expand All @@ -122,36 +138,38 @@ darkPint = document.createElement("div");
darkPint.id = "darkPint";
body.appendChild(darkPint);

chrome.storage.sync.get('isTurn', function (data) {
console.log("asd")
turn = data.isTurn;

if (turn == null || turn == undefined) {
chrome.storage.sync.set({ isTurn: true });
console.log("AHAAHAHAHLOH");
}

if (turn == true) useCSS();

if (turn == false) {
let darkPint = document.getElementById("darkPint");
if (!darkPint) {
console.log("негра нет")
darkPint.innerHTML = "";
}
// var theFirstChild = body.firstChild;


}
useCSSStyles();
console.log(turn);
});
SetStartValues();

// document.addEventListener("DOMContentLoaded", () => {
// useCSS();
// });

function SetStartValues() {
chrome.storage.sync.get('isTurn', function (data) {
turn = data.isTurn;

if (!turn) chrome.storage.sync.set({ isTurn: false });

if (turn == true) useCSS();

if (turn == false) {
let darkPint = document.getElementById("darkPint");
if (!darkPint) {
darkPint.innerHTML = "";
}
// var theFirstChild = body.firstChild;
}
useCSSStyles();
});

chrome.storage.sync.get('round', function (data) {
if (!data.round) chrome.storage.sync.set({ round: 8 });
});

chrome.storage.sync.get('top', function (data) {
if (!data.top) chrome.storage.sync.set({ top: 8 });
});
}

function useCSS() {
let body = document.getElementsByTagName("html")[0];
Expand Down
3 changes: 2 additions & 1 deletion popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<link rel="stylesheet" href="popup.css">
<link rel="stylesheet" href="popupDesign.css">
<script src="jquery-3.6.0.min.js"></script>
<script src="popup.js"></script>
</head>

<body>
Expand Down Expand Up @@ -42,4 +41,6 @@ <h1>Pinterest Nuar</h1>
</div>

</body>

<script src="popup.js"></script>
</html>
12 changes: 7 additions & 5 deletions popup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
setCurrentStatus($('.switch-btn'));
chrome.action.onClicked.addListener((tab) => { console.log("AHAHA") });
document.addEventListener('DOMContentLoaded', function () {
//tumbler()
console.log("pop")
setCurrentStatus($('.switch-btn'));
let turn = document.getElementById("turn");

let roundRange = document.getElementsByClassName("roundRange")[0];
Expand Down Expand Up @@ -90,11 +91,11 @@ function Wrapper(key, value) {
function TurnExtension() {
chrome.storage.sync.get('isTurn', function (data) {
turn = data.isTurn;
console.log(turn);
console.log("ahaakkakakak: " + turn);
let darkPint = document.getElementById("darkPint");
let darkPintStyle = document.getElementById("darkPintStyle");

if (turn == null || turn == undefined) chrome.storage.sync.set({ isTurn: true });
if (!turn) chrome.storage.sync.set({ isTurn: false });

if (turn == false) {
if (darkPint) useCSS();
Expand Down Expand Up @@ -134,7 +135,7 @@ function setCurrentStatus(buttonTurn) {
chrome.storage.sync.get('isTurn', function (data) {
turn = data.isTurn;

if (turn == null || turn == undefined) chrome.storage.sync.set({ isTurn: true });
if (!turn) turn = false;

if (turn == true) {
buttonTurn.addClass('switch-on');
Expand All @@ -152,7 +153,7 @@ function setCurrentStatus(buttonTurn) {

chrome.storage.sync.get('round', function (data) {
let round = data.round;

if (!round) round = 8;
let roundRange = document.getElementsByClassName("roundRange")[0];

let style = document.querySelector('.punktText.roundingText').style;
Expand All @@ -168,6 +169,7 @@ function setCurrentStatus(buttonTurn) {

chrome.storage.sync.get('top', function (data) {
let top = data.top;
if (!top) top = 8;

let topRange = document.getElementsByClassName("topRange")[0];

Expand Down

0 comments on commit cf35496

Please sign in to comment.