Skip to content

Commit

Permalink
add: close button
Browse files Browse the repository at this point in the history
  • Loading branch information
amirshnll committed Apr 10, 2024
1 parent f8f055b commit 147d121
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</p>

<p align="center">
<img src="https://img.shields.io/badge/version-1.2.0-blue" alt="version">
<img src="https://img.shields.io/badge/version-1.3.0-blue" alt="version">
<img src="https://img.shields.io/badge/Chrome Web Store extension rating-★★★★☆-brightgreen" alt="rating">
<br/>
<a href="https://twitter.com/intent/follow?screen_name=rtbf_ir">
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.0",
"version": "1.3.0",
"manifest_version": 3,
"name": "Right to be forgotten",
"description": "نداشتن امکان حذف حساب‌کاربری در بسیاری از سرویس‌ها نقض حریم‌شخصی کاربران است که با حق فراموش شدن برای حذف اطلاعات، مغایرت دارد.",
Expand Down
45 changes: 29 additions & 16 deletions popup.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@charset "UTF-8";

@font-face {
font-family: dana;
font-style: normal;
font-weight: 400;
src: url(assets/fonts/dana-fanum-regular.eot);
src: url(assets/fonts/dana-fanum-regular.eot?#iefix)
format("embedded-opentype"),
src: url(assets/fonts/dana-fanum-regular.eot?#iefix) format("embedded-opentype"),
url(assets/fonts/dana-fanum-regular.woff2) format("woff2"),
url(assets/fonts/dana-fanum-regular.woff) format("woff");
}
Expand All @@ -19,82 +19,95 @@
display: flex;
justify-content: flex-end;
align-items: center;
padding: 10px;
padding: 10px
}

.popup-container .difficulty-container {
display: none;
height: 100%;
flex-direction: column;
align-items: flex-end;
align-items: flex-end
}

.popup-container .difficulty-container .difficulty-text {
border-radius: 0.25rem;
border-radius: .25rem;
padding: 5px 8px;
color: #fff;
margin-bottom: 0;
margin-left: 0.5rem;
margin-left: .5rem
}

.popup-container .difficulty-container .difficulty-box {
display: flex;
flex-direction: row-reverse;
justify-content: center;
align-items: center;
margin-bottom: 1rem;
margin-bottom: 1rem
}

.popup-container .difficulty-container .remove-button {
display: none;
padding: 5px 8px;
font-size: 14px;
font-size: 14px
}

.popup-container .difficulty-container .difficulty-info {
font-size: x-small;
direction: rtl;
text-align: right;
margin-bottom: 32px;
margin-bottom: 32px
}

.popup-container .difficulty-container .correction-link {
font-size: 12px;
position: absolute;
bottom: 16px;
left: 20px;
text-decoration: none;
text-decoration: none
}

.popup-container .not-supported-container {
display: none;
text-align: right;
font-size: small;
font-size: small
}

.popup-container .not-supported-container .not-supported-text {
direction: rtl;
direction: rtl
}

.popup-container .not-supported-container .not-supported-link {
font-size: 12px;
text-decoration: none;
text-decoration: none
}

.popup-container .spinner-container {
height: 100px;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
width: 100%
}

.popup-container .spinner-container .fa-circle-notch {
font-size: 25px;
font-size: 25px
}

.plugin-title {
font-size: 13px;
padding: 15px 15px 0;
direction: rtl;
direction: rtl
}

.close-button {
color: red;
cursor: pointer;
background: none;
border: none;
font-size: 13px;
font-family: dana;
direction: rtl;
position: absolute;
top: 15px;
left: 10px
}
8 changes: 5 additions & 3 deletions popup.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<html lang="fa">

<head>
<meta charset="UTF-8">
<meta charset="UTF-8" />
<title>rtbf.ir</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous" />
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
<link rel="stylesheet" href="popup.css">
<link rel="stylesheet" href="popup.css" />
</head>

<body style=" margin: 0; padding: 0; height: 100%; font-family: dana, serif;">
<h1 class="plugin-title">وضعیت حق فراموش شدن <span class="service-name"></span></h1>
<button id="closeButton" class="close-button">x بستن</button>

<div class="popup-container">
<div class="difficulty-container">
<div class="difficulty-box">
Expand Down
13 changes: 12 additions & 1 deletion popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,15 @@ chrome?.tabs?.query(
);
});
}
);
);

document.addEventListener("DOMContentLoaded", function () {
var closeButton = document.getElementById("closeButton");
closeButton.addEventListener(
"click",
function () {
window.close();
},
false
);
});

0 comments on commit 147d121

Please sign in to comment.