Skip to content

Commit 58f03ec

Browse files
committed
README/chrome-popup/manifest.json added
1 parent 3657563 commit 58f03ec

File tree

6 files changed

+65
-23
lines changed

6 files changed

+65
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CrackTech - Find LeetCode Company Tags
1+
# CrackTech - Get LeetCode Company Tags
22

33
## This extension gives you the information of the companies who asked a certain question in the technical interview.
44
Are you preparing for your technical interviews? Are you looking for the question asked by companies like Microsoft, Google, Meta, Apple, etc.? Then this extension gives you what you are looking for.

chrome/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "LeetCode Which Company",
3-
"version": "1.0.4",
2+
"name": "CrackTech - Find LeetCode Company Tags",
3+
"version": "1.0.5",
44
"homepage_url":"https://github.com/ssavi-ict/LC-Which-Company",
5-
"description": "While solving a LeetCode problem this extension shows the name of companies who asked that problem.",
5+
"description": "An extension that can help candidate to prepare for a Company specific DSA interview.",
66
"manifest_version": 3,
77
"author": "Avik Sarkar",
88
"action":{
99
"default_popup": "popup.html",
10-
"default_title": "LeetCode Which Company"
10+
"default_title": "CrackTech - Find LeetCode Company Tags"
1111
},
1212
"icons": {
1313
"32": "res/32.png"

chrome/popup.html

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,41 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>LC-Which Company</title>
4+
<title>CrackTech - Get LeetCode Company Tags</title>
55
<style>
6-
6+
table {
7+
width: 400px;
8+
table-layout: fixed;
9+
margin-left: auto;
10+
margin-right: auto;
11+
margin-top: 15px;
12+
}
13+
td {
14+
word-wrap: break-word;
15+
text-align: center;
16+
}
17+
td a {
18+
display: block;
19+
font-size: 12px;
20+
font-weight: bold;
21+
text-decoration: none;
22+
color: black;
23+
}
724
</style>
825
</head>
926
<body>
1027
<div id = "main-content" class="newdiv" style="width: 400px; min-height: 250px; border: 1px solid; border-image: linear-gradient(to right, red,green, blue);border-image-slice: 1;">
1128

1229
</div>
13-
<h3 style="border: 1px dotted blue; padding: 5px; width: 127px;">
14-
<a style="text-decoration:none" href ="https://github.com/ssavi-ict/LC-Which-Company" target="_blank">
15-
Click To Contribute
16-
</a>
17-
</h3>
18-
<h3 style="float: right;margin-top: -45px; border: 1px dotted blue; padding:6px;">
19-
<a style="text-decoration:none" href ="index.html" target="_blank">
20-
Complete List
21-
</a>
22-
</h3>
30+
<div class="footer_content" id="footer_content_1">
31+
<table>
32+
<tr>
33+
<td><a href="https://github.com/ssavi-ict/LeetCode-Which-Company/issues/4" target="_blank">Contribute</a></td>
34+
<td><a href="https://www.buymeacoffee.com/ssavi" target="_blank">Buy Me A Coffee</a></td>
35+
<td><a href="index.html" target="_blank">All Company</a></td>
36+
</tr>
37+
</table>
38+
</div>
2339
</body>
2440
<script type="text/javascript" src="popup.js"></script>
2541
</html>

chrome/popup.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ async function leetcode_company(){
1717
document.write(`<li>${tabs[0].url}</li>`);
1818
document.write('</ul>');*/
1919
let url = tabs[0].url;
20+
if (url.startsWith("http://")) {
21+
url = url.replace("http://", "https://");
22+
}
23+
24+
if (url.startsWith("https://leetcode.cn/")) {
25+
url = url.replace("https://leetcode.cn/", "https://leetcode.com/");
26+
}
27+
2028
if (url.includes("leetcode")){
2129
const requestURL = 'https://raw.githubusercontent.com/ssavi-ict/LC-Which-Company/main/data/company_info.json';
2230
const request = new Request(requestURL);
@@ -56,7 +64,12 @@ async function leetcode_company(){
5664
}
5765
}
5866
else{
59-
document.getElementById("main-content").innerHTML = `<center><img src="res/leetcode.gif" style="width: 400px;"></center>`;
67+
let text = "<center><p>";
68+
text += "<p style='display: inline-block; border-radius: 2px; margin-bottom:5px; font-size:14px;'>&nbsp;<b>";
69+
text += "This is a Non-LeetCode Website.";
70+
text += "</b></p>&nbsp;";
71+
text += "</p></center>";
72+
document.getElementById("main-content").innerHTML = text;
6073
}
6174
});
6275
}

firefox/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "LeetCode Which Company",
3-
"version": "1.0.4",
2+
"name": "CrackTech - Find LeetCode Company Tags",
3+
"version": "1.0.5",
44
"homepage_url":"https://github.com/ssavi-ict/LC-Which-Company",
5-
"description": "While solving a LeetCode problem this extension shows the name of companies who asked that problem.",
5+
"description": "An extension that can help candidate to prepare for a Company specific DSA interview.",
66
"manifest_version": 2,
77
"author": "Avik Sarkar",
88
"browser_action":{
99
"default_popup": "popup.html",
10-
"default_title": "LeetCode Which Company"
10+
"default_title": "CrackTech - Find LeetCode Company Tags"
1111
},
1212
"icons": {
1313
"32": "res/32.png"

firefox/popup.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ async function leetcode_company(){
1717
document.write(`<li>${tabs[0].url}</li>`);
1818
document.write('</ul>');*/
1919
let url = tabs[0].url;
20+
if (url.startsWith("http://")) {
21+
url = url.replace("http://", "https://");
22+
}
23+
24+
if (url.startsWith("https://leetcode.cn/")) {
25+
url = url.replace("https://leetcode.cn/", "https://leetcode.com/");
26+
}
27+
2028
if (url.includes("leetcode")){
2129
const requestURL = 'https://raw.githubusercontent.com/ssavi-ict/LC-Which-Company/main/data/company_info.json';
2230
const request = new Request(requestURL);
@@ -56,7 +64,12 @@ async function leetcode_company(){
5664
}
5765
}
5866
else{
59-
document.getElementById("main-content").innerHTML = `<center><img src="res/leetcode.gif" style="width: 400px;"></center>`;
67+
let text = "<center><p>";
68+
text += "<p style='display: inline-block; border-radius: 2px; margin-bottom:5px; font-size:14px;'>&nbsp;<b>";
69+
text += "This is a Non-LeetCode Website.";
70+
text += "</b></p>&nbsp;";
71+
text += "</p></center>";
72+
document.getElementById("main-content").innerHTML = text;
6073
}
6174
});
6275
}

0 commit comments

Comments
 (0)