Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<td rowspan="2" style="width: 80px"><button id="CV1">Build CV1</button></td>
<td align="center">
<a href="https://sites.google.com/view/dynac-kgp-erp/home" , target="new"
><img src="images\logo_white_bg.png"
><img src="images/logo_white_bg.png"
/></a>
</td>
</tr>
Expand Down
9 changes: 6 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"description": "Enhances your CV making experience with IIT KGP ERP by providing real-time updates to any changes made.",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"action": {
"default_title": "Dynac Extension",
"default_popup": "index.html"
Expand All @@ -16,5 +13,11 @@
"32": "images/logo_black_bg.png",
"48": "images/logo_black_bg.png",
"128": "images/logo_black_bg.png"
},
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"strict_min_version": "57.0"
}
}
}
11 changes: 8 additions & 3 deletions scripts/tab_func.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for chrome as well?

Copy link
Author

@Himesh-Kundal Himesh-Kundal Jun 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab_func.js is working fine on both browsers. still should be tested on an actual CV to be sure

Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// Trigger the renderer.js
//"tabs",
//"webNavigation"
var dis = document.getElementById("not_url_display");
const dis = document.getElementById("not_url_display");

const script = document.createElement('script');
script.src = "scripts/webextension-polyfill.js";
document.head.appendChild(script);

document.getElementById("CV1").addEventListener("click", () => {
chrome.tabs.query({ currentWindow: true, active: true }, (tabs) => {
browser.tabs.query({ currentWindow: true, active: true }).then((tabs) => {
if (tabs[0].url == "https://erp.iitkgp.ac.in/IIT_ERP3/showmenu.htm") {
chrome.scripting.executeScript({
browser.scripting.executeScript({
target: { tabId: tabs[0].id, allFrames: false },
//world:"ISOLATED",
files: ["scripts/renderer.js"],
Expand Down
Loading