Skip to content

Commit

Permalink
Add source code
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Mar 31, 2023
1 parent 4cc3924 commit 187f702
Show file tree
Hide file tree
Showing 18 changed files with 1,505 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web-ext-artifacts
TODOs.md
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
angular.module('tabsApp', ['ui.sortable']);
Binary file added fonts/CabinSketch-Bold.ttf
Binary file not shown.
Binary file added fonts/Roboto-Bold.ttf
Binary file not shown.
Binary file added fonts/Roboto-Regular.ttf
Binary file not shown.
Binary file added images/icon_16x16_straight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions immortal-pins_demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"color":"#4688f1","savedTabs":[{"index":0,"protocol":"https://","rule":"Loose","state":"Enabled","url":"mail.google.com/mail/u/0/"},{"index":1,"protocol":"https://","rule":"Loose","state":"Enabled","url":"mail.google.com/chat/u/1/"},{"index":2,"protocol":"https://","rule":"Loose","state":"Enabled","url":"calendar.google.com/calendar/u/0/r"},{"index":3,"protocol":"https://","regex":"^https:\\/\\/app\\.slack\\.com\\/client\\/Z0BNYK6X5.+","rule":"Regex","state":"Enabled","url":"app.slack.com/client/Z0BNYK6X5/CWBQZFBYF"},{"index":4,"protocol":"https://","rule":"Loose","state":"Enabled","url":"ticktick.com/webapp"},{"index":5,"protocol":"https://","rule":"Exact","state":"Enabled","url":"discord.com/channels/@me"},{"index":6,"protocol":"https://","rule":"Exact","state":"Enabled","url":"steamcommunity.com/chat"},{"index":7,"protocol":"https://","rule":"Exact","state":"Disabled","url":"reddit.com"}]}
1 change: 1 addition & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"typeAcquisition": {"include": ["chrome"]}}
1 change: 1 addition & 0 deletions libraries/FileSaver-2.0.4.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

351 changes: 351 additions & 0 deletions libraries/angular-1.8.2.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions libraries/angular-sortable-0.19.0.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions libraries/jquery-3.6.4.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions libraries/jquery-ui-1.13.2.min.js

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Immortal Pins",
"description": "Restore pins from a saved list of pinned tabs",
"version": "0.1.4",
"manifest_version": 3,
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "/images/icon_16x16.png",
"32": "/images/icon_32x32.png",
"48": "/images/icon_48x48.png",
"128": "/images/icon_128x128.png"
}
},
"icons": {
"16": "/images/icon_16x16.png",
"32": "/images/icon_32x32.png",
"48": "/images/icon_48x48.png",
"128": "/images/icon_128x128.png"
},
"options_ui": {
"page": "options.html",
"open_in_tab": true
},
"permissions": [ "storage", "tabs" ],
"browser_specific_settings": {
"gecko": {
"id": "[email protected]"
}
}
}
136 changes: 136 additions & 0 deletions options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<!DOCTYPE html>
<html ng-app="tabsApp">
<head>
<link rel='stylesheet' href='styles.css'>
<!-- Add AngularJS and jQuery libraries -->
<!-- AngularJS, migrate to Angular instead -->
<script src="libraries/jquery-3.6.4.min.js"></script>
<script src="libraries/jquery-ui-1.13.2.min.js"></script>
<script src="libraries/angular-1.8.2.min.js"></script>
<!-- Add angular-ui-sortable library -->
<script src="libraries/angular-sortable-0.19.0.min.js"></script>
<!-- Add github.com/eligrey/FileSaver.js library -->
<script src="libraries/FileSaver-2.0.4.min.js"></script>

<!-- Add custom AngularJS app and controller files -->
<script src="app.js"></script>
<script src="tabsController.js"></script>
</head>
<body ng-controller="TabsController">

<div class="container">
<div id="top-half-colorparent">
<div id="top-half">

<div class="settings-box-container">
<div class="image-container">
<img id="heading-icon" src="images/icon_128x128.png" alt="Immortal Pins icon">
<div class="heading-container">
<span class="icon-text">Immortal Pins</span>
</div>
</div>

<div id="tab-url-container">
<span class="settings-text">Pin URL</span>
<div class="tab-url-elements">
<div class="tab-url-rectangle-box">
<div class="tab-url-protocol-dropdown">
<div class="dropdown">
<button class="dropbtn" id="dropbtn-protocol-button">https://</button>
<div class="dropdown-content" id="protocol-options">
</div>
</div>
</div>
<input type="text" id="tabUrl" name="tabUrl" placeholder="www.example.com">
</div>
<button ng-click="saveTab()" id="save-button">
<img src="images/icon-save.svg" alt="Save icon" id="save-button-icon">
Save
</button>
</div>
</div>

<div id="rule-container">
<span class="settings-text">Rule type</span>
<div id="rule-rectangle-box" class="rule-rectangle-box">
</div>
<span id="rule-type-desc"></span>
</div>

<div id="regex-container">
<span class="settings-text">RegEx</span>
<div class="regex-input-wrapper">
<input type="text" id="regex-input" name="regexInput" placeholder="^https:\/\/example\.com">
</div>
</div>
</div>
</div>

<p id="warningBox"></p>
</div>

<div id="bottom-half">
<div class="button-container">
<span id="saved-pins-text">Saved Pins</span>
<div id="div-filler"></div>
<button class="settings-button" id='button-sync' ng-click="syncTabs()">
<img src="images/icon-sync.svg" class="settings-button-icon">
Revive pins
</button>
<button class="settings-button" id='button-export' ng-click="exportSettings()">
<img src="images/icon-export.svg" class="settings-button-icon">
Export Settings
</button>
<button class="settings-button" id='button-import' ng-click="importSettings()">
<img src="images/icon-import.svg" class="settings-button-icon">
Import Settings
</button>
<button class="settings-button" id='buttonWarning' ng-click="removeAllTabs()">
<img src="images/icon-delete.svg" class="settings-button-icon">
Remove all pins
</button>
</div>
<ul ui-sortable="sortableOptions" ng-model="savedTabs">
<li ng-repeat="savedTab in savedTabs track by $index">
<div class="rule-rectangle">
<span class="rule-rectangle-text">{{ savedTab.rule }}</span>
</div>
<div class="tab-texts">
<div class="tab-texts-bluh">
<span class="protocol-text">{{ savedTab.protocol }}</span>
<span class='savedTabURL savedTabURL-{{ savedTab.state }}'>{{ savedTab.url }}</span>
</div>
<p class="tab-regex-text tab-regex-text-{{ savedTab.rule }}">{{ savedTab.regex }}</p>
</div>
<div class="tab-button-container">
<button ng-click="toggleEnableState(savedTab)" class="button-switch button-{{ savedTab.state }}">
<img class="icon-on image-{{ savedTab.state }}" src="images/icon-button-on.svg">
<img class="icon-off image-{{ savedTab.state }}" src="images/icon-button-off.svg">
{{ savedTab.state }}
</button>
<button ng-click="editTab(savedTab)" class='button-edit'>
<img class="icon-copy" src="images/icon-copy.svg">
Copy
</button>
<button ng-click="removeTab(savedTab)" class='button-warning'>
<img class="icon-delete-light" src="images/icon-delete-light.svg">
Remove
</button>
</div>
</li>
</ul>
<div id="donation-buttons">
<button ng-click="donatePaypal()" id="button-donate">
<img src="images/icon-paypal.svg" id="paypal-logo" alt="PayPal Logo">
Support me via PayPal
</button>
<button ng-click="donatePatreon()" id="button-donate">
<img src="images/Digital-Patreon-Logo_FieryCoral.png" id="patreon-logo" alt="Patreon Logo">
Become a Patron
</button>
</div>
</div>

</div>
</body>
</html>
28 changes: 28 additions & 0 deletions popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html ng-app="tabsApp">
<head>
<link rel='stylesheet' href='styles.css'>
<!-- Add AngularJS and jQuery libraries -->
<!-- AngularJS, migrate to Angular instead -->
<script src="libraries/jquery-3.6.4.min.js"></script>
<script src="libraries/jquery-ui-1.13.2.min.js"></script>
<script src="libraries/angular-1.8.2.min.js"></script>
<!-- Add angular-ui-sortable library -->
<script src="libraries/angular-sortable-0.19.0.min.js"></script>

<!-- Add custom AngularJS app and controller files -->
<script src="app.js"></script>
<script src="tabsController.js"></script>
</head>
<body ng-controller="TabsController">

<div>
<button ng-click="syncTabs()">Revive pins</button>
</div>

<div>
<button ng-click="goToSettings()">Settings</button>
</div>

</body>
</html>
Loading

0 comments on commit 187f702

Please sign in to comment.