Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
itdominator | c73b42e451 | |
itdominator | 4011b3b191 | |
maximstewart | 82db833f67 | |
maximstewart | 5adf3cbb66 | |
Maxim | e2014e25e7 |
|
@ -4,8 +4,8 @@ Easy Session Manager allows you to manage your Firefox session by backing up or
|
|||
# Download
|
||||
https://addons.mozilla.org/en-US/firefox/addon/easy-session-manager/
|
||||
|
||||
# Version: 0.2.1.7
|
||||
Added "Deselect All" button from @CRImier.
|
||||
# Version: 0.2.3.0
|
||||
* Changed menu gutter positioning
|
||||
|
||||
|
||||
# Images
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": " Easy Session Manager",
|
||||
"version": "0.2.2.7",
|
||||
"name": "Easy Session Manager",
|
||||
"version": "0.2.3.1",
|
||||
"description": "Easy Session Manager allows you to manage your Firefox session by backing up or loading your saved sessions.",
|
||||
|
||||
"applications": {
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "sessionManager@itdominator.com",
|
||||
"strict_min_version": "57.0"
|
||||
|
|
|
@ -21,9 +21,11 @@
|
|||
<li><button name="saveModalLauncher" class="button-primary" type="button">Save</button></li>
|
||||
<li><button name="editModalLauncher" class="button-primary" type="button">Edit</button></li>
|
||||
<li><button name="deleteModalLauncher" class="button-danger" type="button">Delete</button></li>
|
||||
<br/><br/><br/>
|
||||
<br/><br/>
|
||||
<li><button name="freeSessionMeory" class="button-info" type="button">Free Memory</button></li>
|
||||
<br/><br/>
|
||||
<li><button name="import" class="button-primary" type="button">Import</button></li>
|
||||
<li><button name="downloadModalLauncher" class="button-primary" type="button">Download</button></li>
|
||||
<li><button name="downloadModalLauncher" class="button-primary" type="button">Backup</button></li>
|
||||
<li><button name="donate" class="button-warning" type="button">Donate</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -232,10 +234,9 @@
|
|||
|
||||
|
||||
|
||||
<script src="../scripts/utils.js"></script>
|
||||
<script src="../scripts/actions.js"></script>
|
||||
<script src="../scripts/session-manager.js"></script>
|
||||
<script src="../scripts/events.js"></script>
|
||||
|
||||
<script src="../scripts/session-manager.js"></script>
|
||||
<script src="../scripts/utils.js"></script>
|
||||
<script src="../scripts/actions.js"></script>
|
||||
<script src="../scripts/events.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
const message2 = "Name too long or none provided; or, unacceptable character used.";
|
||||
const regexp = /^[a-zA-Z0-9-_]+$/; // Alphanumeric, dash, underscore
|
||||
|
||||
let data = null;
|
||||
|
||||
|
||||
const prePprocessor = (obj, enteryName = '', message = "") => {
|
||||
let inputTag = document.getElementsByName("toSaveNameImport")[0];
|
||||
inputTag.value = enteryName.replace(/ /g, "_");
|
||||
inputTag.value = enteryName.replace(/ /g, "_").replace(/session_/g, "");
|
||||
data = obj.target.result;
|
||||
document.getElementsByName("toSaveImportErrMessage")[0].innerText = message;
|
||||
}
|
||||
|
@ -18,7 +17,6 @@ const processor = () => {
|
|||
|
||||
if (enteryName.length < 0 || enteryName.length > 54 || enteryName.search(regexp) == -1) {
|
||||
messageWindow("danger", message2, "modal-gutter");
|
||||
// prePprocessor(obj, "", message2);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,13 +26,18 @@ document.addEventListener("click", (e) => {
|
|||
const selectedItemName = (selectedItem !== null) ? selectedItem.getAttribute("name") : "";
|
||||
|
||||
// Modals
|
||||
if (/(saveModalLauncher|editModalLauncher|deleteModalLauncher|downloadModalLauncher)/.test(action)) {
|
||||
if (/(saveModalLauncher|freeSessionMeory|editModalLauncher|deleteModalLauncher|downloadModalLauncher)/.test(action)) {
|
||||
if (action == "saveModalLauncher") {
|
||||
preSaveSession(selectedItem, selectedItemName);
|
||||
showModal("saveModal");
|
||||
return ;
|
||||
}
|
||||
|
||||
if (action == "freeSessionMeory") {
|
||||
freeSessionMeory();
|
||||
return ;
|
||||
}
|
||||
|
||||
if (selectedItem) {
|
||||
if (action == "editModalLauncher") {
|
||||
preEditSession(selectedItem, selectedItemName);
|
||||
|
|
|
@ -215,7 +215,7 @@ const loadSession = (json = null, replaceTabs = false) => {
|
|||
let keys = Object.keys(json);
|
||||
let keysLength = Object.keys(json).length;
|
||||
try {
|
||||
browser.windows.getAll().then(windows => {
|
||||
windowApi.getAll().then(windows => {
|
||||
windowApi.getCurrent({populate: true}).then(currentWindow => {
|
||||
let wasCurrentTabId = null;
|
||||
|
||||
|
@ -268,6 +268,21 @@ const loadSession = (json = null, replaceTabs = false) => {
|
|||
|
||||
|
||||
|
||||
const freeSessionMeory = () => {
|
||||
windowApi.getAll({populate: true}).then(windows => {
|
||||
for (let i = 0; i < windows.length; i++) {
|
||||
windows[i].tabs.forEach(tab => {
|
||||
let discarding = tabsApi.discard(tab.id);
|
||||
discarding.then(onDiscarded, onError);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
messageWindow("success", "Freed session memory...");
|
||||
}
|
||||
|
||||
|
||||
|
||||
const confirmSessionOverwrite = () => {
|
||||
storageApi.set({[holderName]: holderData});
|
||||
holderElm = document.getElementsByName(holderName)[0];
|
||||
|
@ -276,3 +291,13 @@ const confirmSessionOverwrite = () => {
|
|||
messageWindow("warning", "Overwrote session...");
|
||||
resetArgs("confModal");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onDiscarded() {
|
||||
console.log(`Discarded`);
|
||||
}
|
||||
|
||||
function onError(error) {
|
||||
console.log(`Error: ${error}`);
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ function sleep(ms) {
|
|||
|
||||
const importSession = () => {
|
||||
browser.tabs.create({
|
||||
url: browser.extension.getURL("../pages/import.html"),
|
||||
url: browser.runtime.getURL("../pages/import.html"),
|
||||
active: true
|
||||
});
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ li {
|
|||
#master-gutter {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0.5em;
|
||||
max-height: 6em;
|
||||
overflow: auto;
|
||||
bottom: 0.2em;
|
||||
max-height: 4em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#savedSessions {
|
||||
|
|
Loading…
Reference in New Issue