Skip to content

Commit 8a55ea4

Browse files
authored
Merge pull request #262 from ssavi-ict/v1.0.8
[v1.0.8] Recent company information | Bug fixes
2 parents 0f2932b + 38b9927 commit 8a55ea4

File tree

11 files changed

+59
-27
lines changed

11 files changed

+59
-27
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Find all the change history listed below
22

3+
**[12/11/2023]**
4+
- v1.0.8 [Features](https://github.com/ssavi-ict/LeetCode-Which-Company/issues/263)
5+
- (✯) Notation for recently asked questions reflected in the following page
6+
- Extension pop up window
7+
- All Company page
8+
- A public All Company information page has been published at [Here](https://ssavi-ict.github.io/LeetCode-Which-Company/)
9+
- A workaround All Company web link is added to the extension PopUP for those who are not able to see the company information for some reason.
10+
- Extension housing bug fixes.
11+
- Chrome only update.
12+
- README Updated.
13+
314
**[22/08/2023]**
415
- v1.0.7 [Features](https://github.com/ssavi-ict/LeetCode-Which-Company/issues/85)
516
- Next to solve [*Easy*] implemented.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ When solving a problem if you click on the ![icon](chrome/res/32.png) from the *
4242

4343
- If the extension is able find the `Company Names` for the leetcode problem on the current window then it will show as follows -
4444
![found](/static/webfile/info_shows.PNG)
45+
- Updation of company information scheduled to be done on a regular basis. You can check the commits tagged `company-info`.
4546

4647
- **💥 NEW FEATURE 💥**
4748

@@ -53,9 +54,13 @@ When solving a problem if you click on the ![icon](chrome/res/32.png) from the *
5354
- The checkbox (*marked in red*) can be checked to receive contest notification everyday twice a day or unchecked if you wish not to receive contest notification. ![notification](/static/webfile/notification.PNG)
5455

5556
- **💥 NEW FEATURE 💥** [*Chrome Only Feature*]
56-
- Click on the **[Be A Pro]** button ![upcoming_contest](/static/webfile/upcoming-contest-button.PNG), it redirect to your preparation zone.
57+
- [v1.0.7] Click on the **[Be A Pro]** button ![upcoming_contest](/static/webfile/upcoming-contest-button.PNG), it redirect to your preparation zone.
5758
It shows your solving summary from where you can get picture of your solving history. Moreover, your going to get suggestions to solve the next Easy/Medium/Hard problem. Now your preparation is going even more fine-tuned. ![solve the next](/static/webfile/problem-suggestion.PNG)
5859

60+
- **💥 NEW FEATURE 💥** [*Chrome Only Feature*]
61+
- [v1.0.8] From now on you will be able to see the companies who asked a question recently for a certain problem. From the available company information for a problem, there will be a (✯) sign located on the right side of the top **5** company. This feature has been added on **Pop Up Window, All Company** page.
62+
- *This information has been collected from the different sources of the internet. It will be hard to verify the exact timeline.*
63+
5964
<br>
6065

6166
- If the extension is not able to find the `Company Names` for the leetcode problem on the current window or if the current window is not a leetcode problem then it will show a **Company information not found** message.
-405 KB
Binary file not shown.
381 KB
Binary file not shown.

chrome/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ <h2 style="font-family: 'Playfair'; font-style: italic; font-weight: bold; borde
7171
</div>
7272
<br><br>
7373
<div id = "company_table">
74+
<h4 style="font-family: 'Playfair'; font-style: italic;"><sup>&#10031;</sup> - <i> Asked in recent interviews</i></h4>
7475
<table id="dtBasicExample" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%" style="font-family: Segoe UI;">
7576
</table>
7677
</div>

chrome/leetcoder.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <h2 style="text-align: center; font-family: Segoe UI;">Quick Access Panel</h2>
149149
</div>
150150
</div>
151151
<hr>
152-
<div class="preparation-container">
152+
<div class="preparation-container" id="cracktech-preparation-container">
153153
<div class = "preparation-header-content" style="border-radius: 1px; margin: 30px 0px 30px; border: 3px solid; border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);border-image-slice: 1;">
154154
<h3 id = "heading-line"></h3>
155155
</div>

chrome/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "CrackTech - Find LeetCode Company Tags",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"homepage_url":"https://github.com/ssavi-ict/LC-Which-Company",
55
"description": "An extension that can help candidate to prepare for a Company specific DSA interview.",
66
"manifest_version": 3,
@@ -24,7 +24,7 @@
2424
],
2525
"content_scripts": [
2626
{
27-
"matches": ["<all_urls>"],
27+
"matches": ["https://leetcode.com/"],
2828
"js": ["script/analyze_profile.js"]
2929
}
3030
]

chrome/popup.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
<body>
4747
<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; font-size: small;">
4848

49+
</div>
50+
<div id="note-content" style="margin-top: -10px; margin-bottom: -10px;">
51+
<p><sup>&#10031;</sup> - <i>Asked in recent interviews</i></p>
4952
</div>
5053
<div class="footer_content" id="footer_content_1">
5154
<table>
@@ -62,7 +65,9 @@
6265
<div class="footer">
6366
[<a href="https://github.com/ssavi-ict/LeetCode-Which-Company/issues/4" target="_blank" style="text-decoration: none;">contribute</a>]
6467
&nbsp;|&nbsp;
65-
[&copy;<a href="https://www.linkedin.com/in/ssavi-ict/" style="text-decoration: none;">ssavi</a>]
68+
[ <a href="https://ssavi-ict.github.io/LeetCode-Which-Company/" style="text-decoration: none;" target="_blank">unable to view company information</a> ]
69+
&nbsp;|&nbsp;
70+
[&copy;<a href="https://www.linkedin.com/in/ssavi-ict/" style="text-decoration: none;" target="_blank">ssavi</a>]
6671
</div>
6772
</body>
6873
<script type="text/javascript" src="popup.js"></script>

chrome/popup.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,23 @@ async function leetcode_company(){
3535

3636
if(json_response [theReformedURL]){
3737
const company_list_elem = json_response[theReformedURL];
38-
const sorted = company_list_elem.slice(1).sort((a, b) => a.length - b.length);
38+
const sorted = company_list_elem.slice(1); // .sort((a, b) => a.length - b.length);
3939
const companies = [company_list_elem[0]].concat(sorted);
40+
4041

4142
let length = companies.length;
4243
let problem_name = ("<h3 style='text-align:center;border-bottom: 2px solid black;background-image: linear-gradient(45deg, red, orange, green, blue, indigo, violet); -webkit-background-clip: text; -webkit-text-fill-color: transparent;'>Problem Name : ");
4344
let text = "<center><p>";
44-
let char_len = 0;
45+
4546
for (let i=0; i<length; i++){
4647
if(i === 0){
4748
problem_name += companies[i] + "</h3>";
4849
}
4950
else{
5051
text += "<p style='display: inline-block; border-radius: 2px; margin-bottom:5px;border: 1px solid; border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);border-image-slice: 1;'>&nbsp;<b>" + companies[i];
52+
if(i <= 5) {
53+
text += " <sup>&#10031;</sup>";
54+
}
5155
text += "&nbsp; </b></p>&nbsp;";
5256
}
5357
}

chrome/script/analyze_profile.js

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -350,23 +350,28 @@ async function fetchLeetCodeData(locator_param) {
350350
});
351351
}
352352

353-
// Example usage: Fetch data and use it
354-
fetchLeetCodeData(0);
355-
356-
const easy_button = document.getElementById("easy_button");
357-
const mid_button = document.getElementById("mid_button");
358-
const hard_button = document.getElementById("hard_button");
359-
360-
// Add onclick event handlers for each button
361-
easy_button.onclick = function() {
362-
fetchLeetCodeData(1);
363-
};
364-
365-
mid_button.onclick = function() {
366-
fetchLeetCodeData(2);
367-
};
368-
369-
hard_button.onclick = function() {
370-
fetchLeetCodeData(3);
371-
};
353+
document.addEventListener('DOMContentLoaded', function () {
354+
if (window.location.href.includes('leetcoder.html')) {
355+
// Example usage: Fetch data and use it
356+
fetchLeetCodeData(0);
357+
358+
const easy_button = document.getElementById("easy_button");
359+
const mid_button = document.getElementById("mid_button");
360+
const hard_button = document.getElementById("hard_button");
361+
362+
// Add onclick event handlers for each button
363+
if(!easy_button && !mid_button && !hard_button) return;
364+
easy_button.onclick = function() {
365+
fetchLeetCodeData(1);
366+
};
367+
368+
mid_button.onclick = function() {
369+
fetchLeetCodeData(2);
370+
};
371+
372+
hard_button.onclick = function() {
373+
fetchLeetCodeData(3);
374+
};
375+
}
376+
});
372377

0 commit comments

Comments
 (0)