Skip to content

Commit f59052d

Browse files
committed
add: close button
1 parent e73dd4a commit f59052d

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</p>
66

77
<p align="center">
8-
<img src="https://img.shields.io/badge/version-1.2.0-blue" alt="version">
8+
<img src="https://img.shields.io/badge/version-1.3.0-blue" alt="version">
99
<img src="https://img.shields.io/badge/Firefox extension rating-★★★★☆-brightgreen" alt="rating">
1010
<br/>
1111
<a href="https://twitter.com/intent/follow?screen_name=rtbf_ir">

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Right to be forgotten",
4-
"version": "1.2.0",
4+
"version": "1.3.0",
55
"description": "نداشتن امکان حذف حساب‌کاربری در بسیاری از سرویس‌ها نقض حریم‌شخصی کاربران است که با حق فراموش شدن برای حذف اطلاعات، مغایرت دارد.",
66
"icons": {
77
"48": "assets/images/logo.png",

popup.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,16 @@
9898
padding: 15px 15px 0px 15px;
9999
direction: rtl;
100100
}
101+
102+
.close-button {
103+
color: red;
104+
cursor: pointer;
105+
background: none;
106+
border: none;
107+
font-size: 13px;
108+
font-family: dana;
109+
direction: rtl;
110+
position: absolute;
111+
top: 12px;
112+
left: 10px
113+
}

popup.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
<html lang="en">
33

44
<head>
5-
<meta charset="UTF-8">
5+
<meta charset="UTF-8" />
66
<title>rtbf.ir</title>
77
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
88
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous" />
99
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
1010
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
11-
<link rel="stylesheet" href="popup.css">
11+
<link rel="stylesheet" href="popup.css" />
1212
</head>
1313

1414
<body style=" margin: 0; padding: 0; height: 100%; font-family: dana, serif;">
1515
<h1 class="plugin-title">وضعیت حق فراموش شدن <span class="service-name"></span></h1>
16+
<button id="closeButton" class="close-button">x بستن</button>
17+
1618
<div class="popup-container">
1719
<div class="difficulty-container">
1820
<div class="difficulty-box">

popup.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,14 @@ browser?.tabs?.query(
8989
});
9090
}
9191
);
92+
93+
document.addEventListener("DOMContentLoaded", function () {
94+
var closeButton = document.getElementById("closeButton");
95+
closeButton.addEventListener(
96+
"click",
97+
function () {
98+
window.close();
99+
},
100+
false
101+
);
102+
});

0 commit comments

Comments
 (0)