fix delete fail and add mynav ad

This commit is contained in:
qcrao
2025-01-21 16:47:57 +08:00
parent 4c195b945b
commit a2f8abcb7b
4 changed files with 123 additions and 50 deletions

View File

@@ -64,7 +64,7 @@ async function deleteConversation(checkbox) {
// Look for hoverable element within the conversation element // Look for hoverable element within the conversation element
const hoverableDiv = conversationElement.querySelector( const hoverableDiv = conversationElement.querySelector(
"div.can-hover\\:group-hover\\:flex" "div.can-hover\\:group-hover\\:visible"
); );
if (!hoverableDiv) { if (!hoverableDiv) {
console.log("Skipping conversation - no hoverable element found"); console.log("Skipping conversation - no hoverable element found");

120
popup.css
View File

@@ -1,6 +1,6 @@
body { body {
width: 280px; width: 280px;
padding: 20px; padding: 20px 20px 12px;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -131,46 +131,118 @@ button#bulk-archive {
} }
.footer { .footer {
margin-top: 20px; margin-top: 12px;
width: 100%; width: 100%;
font-size: 12px; padding: 12px 0 0;
text-align: center;
border-top: 2px solid #e1e4e8; border-top: 2px solid #e1e4e8;
padding-top: 15px;
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 20px;
}
#sponsorLink {
display: inline-flex;
align-items: center; align-items: center;
padding: 8px 15px; gap: 8px;
background-color: #34495e; }
border-radius: 5px;
color: #fff; .footer-button {
text-decoration: none; text-decoration: none;
cursor: pointer; border-radius: 8px;
transition: all 0.3s ease; transition: all 0.2s ease;
font-weight: 500; padding: 8px 12px;
flex-shrink: 0;
} }
#sponsorLink:hover { .footer-button:hover {
background-color: #2c3e50;
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} }
#sponsorLink .icon-text { .footer-button .button-content {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
} }
/* Sponsor button styles */
#sponsorLink {
background: #2d333b;
color: white;
min-width: auto;
padding: 8px;
}
#sponsorLink .button-content {
display: flex;
align-items: center;
justify-content: center;
}
#sponsorLink span {
display: none;
}
#sponsorLink svg {
width: 20px;
height: 20px;
fill: #ff69b4;
animation: pulse 2s infinite;
margin: 0;
}
#sponsorLink:hover { #sponsorLink:hover {
background-color: #993366; background: linear-gradient(to right, #373e47, #545d68);
transform: translateY(-2px); }
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
/* MyNav ad styles */
.nav-ad {
background: #5046e5;
color: white;
flex-grow: 0;
width: auto;
}
.nav-ad .button-content {
flex-direction: row;
align-items: center;
justify-content: center;
position: relative;
gap: 8px;
width: 100%;
}
.nav-ad .title {
font-size: 16px;
font-weight: 600;
}
.nav-ad .description {
display: none;
}
.nav-ad .emoji {
position: static;
transform: none;
font-size: 16px;
}
.nav-ad:hover {
background: #4038cc;
}
.footer-separator {
height: 24px;
width: 1px;
background-color: #e5e7eb;
margin: 0 2px;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
} }
.modal { .modal {

View File

@@ -33,25 +33,26 @@
</div> </div>
<div class="footer"> <div class="footer">
<a <a href="https://github.com/sponsors/qcrao"
href="https://github.com/sponsors/qcrao"
target="_blank" target="_blank"
id="sponsorLink"> id="sponsorLink"
<svg class="footer-button">
aria-hidden="true" <div class="button-content">
height="16" <svg aria-hidden="true" viewBox="0 0 16 16" version="1.1" data-view-component="true" class="octicon octicon-heart">
viewBox="0 0 16 16" <path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002Z"></path>
version="1.1"
width="16"
data-view-component="true"
class="octicon octicon-heart icon-sponsor mr-1 v-align-middle color-fg-sponsors anim-pulse-in"
style="fill: #bc6796; vertical-align: middle">
<path
d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path>
</svg> </svg>
&nbsp;Sponsor </div>
</a>
<div class="footer-separator"></div>
<a href="https://chromewebstore.google.com/detail/my-nav/hagcohiondnnjimialmlneleljfmkflf"
target="_blank"
id="myNavAd"
class="footer-button nav-ad">
<div class="button-content">
<span class="title">Try MyNav</span>
<span class="emoji">🚀</span>
</div>
</a> </a>
<p id="copyright"></p>
</div> </div>
<div id="customModal" class="modal"> <div id="customModal" class="modal">

View File

@@ -213,16 +213,16 @@ function showModal() {
}); });
} }
function updateCopyrightYear() { // function updateCopyrightYear() {
const currentYear = new Date().getFullYear(); // const currentYear = new Date().getFullYear();
document.getElementById( // document.getElementById(
"copyright" // "copyright"
).innerHTML = `&copy; ${currentYear} <a href="https://github.com/qcrao/bulk-delete-chatGPT" target="_blank">qcrao@GitHub</a>`; // ).innerHTML = `&copy; ${currentYear} <a href="https://github.com/qcrao/bulk-delete-chatGPT" target="_blank">qcrao@GitHub</a>`;
} // }
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
initializeButtons(); initializeButtons();
updateCopyrightYear(); // updateCopyrightYear();
checkMembershipStatus(); checkMembershipStatus();
}); });