Skip to content

Commit

Permalink
Restructure files, update dependencies, fix extension icon and avoid …
Browse files Browse the repository at this point in the history
…unnecessary page scrolling

Resolves #13
  • Loading branch information
felladrin committed Dec 19, 2020
1 parent 2929809 commit 9e67e08
Show file tree
Hide file tree
Showing 9 changed files with 2,220 additions and 905 deletions.
3,099 changes: 2,206 additions & 893 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"url": "https://github.com/felladrin/linkedin-autoconnect-chrome-extension/issues"
},
"scripts": {
"build": "run-s remove-dist-folder build-popup build-tab copy-static-files-to-dist zip-dist-folder",
"build-popup": "npx parcel build src/popup/popup.html --no-source-maps",
"build-tab": "npx parcel build src/tab/tab.ts --no-source-maps",
"watch": "run-s build parcel-watch",
"build": "run-s remove-dist-folder parcel-build copy-static-files-to-dist zip-dist-folder",
"parcel-watch": "parcel watch src/popup/popup.html src/tab/tab.ts",
"parcel-build": "parcel build src/popup/popup.html src/tab/tab.ts --no-source-maps",
"copy-static-files-to-dist": "shx cp -r \"static/*\" \"dist\"",
"zip-dist-folder": "cd dist && bestzip linkedin-autoconnect-chrome-extension.zip *",
"remove-dist-folder": "shx rm -rf dist"
Expand All @@ -24,7 +25,7 @@
"@types/chrome": "^0.0.126",
"bestzip": "^2.1.7",
"npm-run-all": "^4.1.5",
"parcel": "^2.0.0-beta.1",
"parcel": "^2.0.0-nightly.485",
"shx": "^0.3.3"
}
}
4 changes: 2 additions & 2 deletions src/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>LinkedIn AutoConnect</title>
<link rel="stylesheet" href="popup.css" />
<link rel="stylesheet" href="./popup.css" />
</head>

<body>
Expand Down Expand Up @@ -31,6 +31,6 @@
</div>
<button id="startButton"><span>START</span></button>
<button id="stopButton"><span>STOP</span></button>
<script src="popup.ts"></script>
<script src="./popup.ts"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/popup/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ state.startButton.addEventListener("click", () => {
ExtensionMessage.IsAutoConnectAvailable,
(response) => {
if (!response) {
chrome.tabs.executeScript({ file: "tab.js" }, () => {
chrome.tabs.executeScript({ file: "tab/tab.js" }, () => {
chrome.tabs.sendMessage(
activeTab.id,
ExtensionMessage.StartAutoConnect
Expand Down
1 change: 0 additions & 1 deletion src/tab/functions/addPeopleFromRecommendedForYouPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function addPeopleFromRecommendedForYouPage() {
item.focus();
item.click();
item.disabled = true;
window.scrollBy(0, 200);
}
}, alreadyInvited++ * delayBetweenClicks);
}
Expand Down
1 change: 0 additions & 1 deletion src/tab/functions/addPeopleFromSearchPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export function addPeopleFromSearchPage() {
button.focus();
button.click();
button.disabled = true;
window.scrollBy(0, 200);
clickSendNowButtonIfAvailable();
dismissEmailRequiredDialog();
}
Expand Down
File renamed without changes
File renamed without changes
9 changes: 6 additions & 3 deletions static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"manifest_version": 2,
"name": "LinkedIn AutoConnect",
"description": "Automatically clicks all 'Connect' buttons available on LinkedIn 'Search People' and 'Recommended For You' pages.",
"version": "1.2.6",
"version": "1.2.7",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
"default_popup": "popup/popup.html"
},
"icons": {
"16": "images/icon16.png",
"128": "images/icon128.png"
},
"permissions": ["activeTab", "tabs", "*://*.linkedin.com/*"]
}

0 comments on commit 9e67e08

Please sign in to comment.