diff --git a/Tab-Session-Manager/Settings.js b/Tab-Session-Manager/Settings.js
index 0e6a8fc87..bb4b464c4 100644
--- a/Tab-Session-Manager/Settings.js
+++ b/Tab-Session-Manager/Settings.js
@@ -89,14 +89,50 @@ function settingsObj() {};
//spanやoptionのid,buttonのclassに"Label"が含まれるときi18nから値を取得して書き換え
//When "label" is included in span and option id, button class Retrieve the value from i18n and rewrite it
function labelSet() {
+ /*
+ //span idにLableが含まれていたら
+ let spans = document.getElementsByTagName("span");
+ for (let i in spans) {
+ if (spans[i].id == undefined || spans[i].id.indexOf("Label") == -1) continue;
+ let label = browser.i18n.getMessage(spans[i].id);
+ if (label == "") continue;
+ spans[i].innerHTML = label;
+ }
- //span idにLableが含まれていたら
- let spans = document.getElementsByTagName("span");
- for (let i in spans) {
- if (spans[i].id == undefined || spans[i].id.indexOf("Label") == -1) continue;
- let label = browser.i18n.getMessage(spans[i].id);
- if (label == "") continue;
- spans[i].innerHTML = label;
+ //p idにLableが含まれていたら
+ let p = document.getElementsByTagName("p");
+ for (let i in p) {
+ if (p[i].id == undefined || p[i].id.indexOf("Label") == -1) continue;
+ let label = browser.i18n.getMessage(p[i].id);
+ if (label == "") continue;
+ p[i].innerHTML = label;
+ }
+ */
+ //span,p: idかclassにLabelが含まれていたら
+ textLabelSet("p");
+ textLabelSet("span");
+
+ function textLabelSet(tagName) {
+ let items = document.getElementsByTagName(tagName);
+ for (let i of items) {
+ let label;
+ if (i.id != undefined && i.id.indexOf("Label") != -1) {
+ label = browser.i18n.getMessage(i.id);
+ } else if (i.className != undefined && i.className.indexOf("Label") != -1) {
+ let classNames = i.className.split(' ');
+ let labelName;
+ for (let n in classNames) {
+ if (classNames[n].indexOf("Label") != -1) {
+ labelName = classNames[n];
+ break;
+ }
+ }
+ label = browser.i18n.getMessage(labelName);
+ } else {
+ continue;
+ }
+ i.innerHTML = label;
+ }
}
//button, submit, text classにLabelが含まれていたら
diff --git a/Tab-Session-Manager/_locales/en/messages.json b/Tab-Session-Manager/_locales/en/messages.json
index 7913ae782..1a721b2f9 100644
--- a/Tab-Session-Manager/_locales/en/messages.json
+++ b/Tab-Session-Manager/_locales/en/messages.json
@@ -5,30 +5,8 @@
"extDescription": {
"message": "Save and restore the state of windows and tabs. It also supports automatic saving."
},
- "ifOpenNewWindowLabel": {
- "message": "Open session in new window"
- },
- "ifAutoSaveLabel": {
- "message": "Save the session regularly"
- },
- "autoSaveIntervalLabel": {
- "message": "interval(minutes) : "
- },
- "autoSaveLimitLabel": {
- "message": "Maximum number of saved in this way : "
- },
- "ifAutoSaveWhenCloseLabel": {
- "message": "Save the session when window was closed"
- },
- "autoSaveWhenCloseLimitLabel": {
- "message": "Maximum number of saved in this way : "
- },
- "dateFormatLabel": {
- "message": "Date format(Ex YYYY.MM.DD HH:mm:ss) : "
- },
- "ifSupportTstLabel": {
- "message": "Supports Tree Style Tab(Firefox57++)"
- },
+
+
"saveLabel": {
"message": "Save"
},
@@ -54,7 +32,7 @@
"message": "Open"
},
"remove": {
- "message": "Remove"
+ "message": "Delete"
},
"windowLabel": {
"message": "Window"
@@ -71,10 +49,132 @@
"noSessionLabel": {
"message": "There is no session"
},
+
+
+ "settingsLabel": {
+ "message": "Settings"
+ },
+ "sessionsLabel": {
+ "message": "Sessions"
+ },
+ "informationLabel": {
+ "message": "Information"
+ },
+ "ifOpenNewWindowLabel": {
+ "message": "Open session in new window"
+ },
+ "ifOpenNewWindowCaptionLabel": {
+ "message": "If checked off, the session overwrites the current window."
+ },
+ "ifAutoSaveLabel": {
+ "message": "Save the session regularly"
+ },
+ "ifAutoSaveCaptionLabel": {
+ "message": "Save the session every set time."
+ },
+ "autoSaveIntervalLabel": {
+ "message": "interval(minutes)"
+ },
+ "autoSaveIntervalCaptionLabel": {
+ "message": "Minimum value 0.1"
+ },
+ "autoSaveLimitLabel": {
+ "message": "Saved maximum number"
+ },
+ "autoSaveLimitCaptionLabel": {
+ "message": "Maximum number of saved sessions in this way."
+ },
+ "ifAutoSaveWhenCloseLabel": {
+ "message": "Save the session when window was closed"
+ },
+ "ifAutoSaveWhenCloseCaptionLabel": {
+ "message": "Save the session when closing the window or when exiting firefox."
+ },
+ "autoSaveWhenCloseLimitLabel": {
+ "message": "Saved maximum number"
+ },
+ "autoSaveWhenCloseCaptionLabel": {
+ "message": "Maximum number of saved sessions in this way."
+ },
+ "dateFormatLabel": {
+ "message": "Date format"
+ },
+ "dateFormatCaptionLabel": {
+ "message": "Ex YYYY.MM.DD HH:mm:ss"
+ },
+ "ifSupportTstLabel": {
+ "message": "Supports Tree Style Tab"
+ },
+ "ifSupportTstCaptionLabel": {
+ "message": "Restore tree state of Tree Style Tab.
Please turn it off if it is less than fireFox 57."
+ },
"importLabel": {
- "message": "import"
+ "message": "Import sessions"
+ },
+ "importCaptionLabel": {
+ "message": "Load sessions saved on the computer and add them to the current session.
It also supports SessionManager's session file (.session)."
+ },
+ "importButtonLabel": {
+ "message": "Reference..."
+ },
+ "importSaveButtonLabel": {
+ "message": "Import"
+ },
+ "importClearButtonLabel": {
+ "message": "Clear"
},
"exportLabel": {
- "message": "export"
+ "message": "Export Sessions"
+ },
+ "exportCaptionLabel": {
+ "message": "Save the current session on the computer."
+ },
+ "exportButtonLabel": {
+ "message": "Export"
+ },
+ "removeSessionsLabel": {
+ "message": "Delete sessions"
+ },
+ "removeSessionsCaptionLabel": {
+ "message": "Delete all current sessions."
+ },
+ "removeSessionsButtonLabel": {
+ "message": "Delete"
+ },
+ "LicenseLabel": {
+ "message": "License"
+ },
+ "donationLabel": {
+ "message": "Please make a donation"
+ },
+ "donationCaptionLabel": {
+ "message": "Thank you for using Tab Session Manager.
Your support will be a big encouragement as I continue to develop the add-on.
If you like Tab Session Manager,I would be pleased if you could consider donation.
Donation is accepted with eGift Cards of amazon.co.jp.
Please purchase an eGift Cards and send it to the following e-mail address.
email: sienori.firefox@gmail.com"
+ },
+ "amazonTitleLabel": {
+ "message": "amazon.co.jp eGift Cards"
+ },
+ "addonPageLabel": {
+ "message": "add-on page"
+ },
+
+
+
+ "importMessage": {
+ "message": "Sessions imported."
+ },
+ "readFailedMessage": {
+ "message": "Read failed"
+ },
+ "warningRemoveAllMessage": {
+ "message": "Delete all sessions. Is it OK?"
+ },
+ "sessionLabel": {
+ "message": "Session"
+ },
+ "sessionsLabel": {
+ "message": "Sessions"
+ },
+ "amazonUrl": {
+ "message": "https://www.amazon.co.jp/dp/B004N3APGO?language=en_US"
}
}
diff --git a/Tab-Session-Manager/_locales/ja/messages.json b/Tab-Session-Manager/_locales/ja/messages.json
index c9c81d1f7..542bdc895 100644
--- a/Tab-Session-Manager/_locales/ja/messages.json
+++ b/Tab-Session-Manager/_locales/ja/messages.json
@@ -5,30 +5,8 @@
"extDescription": {
"message": "開いているタブやウィンドウを保存し,復元することができます。自動保存にも対応しています。"
},
- "ifOpenNewWindowLabel": {
- "message": "セッションを新しいウィンドウで開く"
- },
- "ifAutoSaveLabel": {
- "message": "定期的にセッションを保存する"
- },
- "autoSaveIntervalLabel": {
- "message": "保存間隔(分) : "
- },
- "autoSaveLimitLabel": {
- "message": "この方法で保存されるセッションの上限保存数 : "
- },
- "ifAutoSaveWhenCloseLabel": {
- "message": "ウィンドウを閉じたときにセッションを保存する"
- },
- "autoSaveWhenCloseLimitLabel": {
- "message": "この方法で保存されるセッションの上限保存数 : "
- },
- "dateFormatLabel": {
- "message": "日付のフォーマット(例YYYY.MM.DD HH:mm:ss) : "
- },
- "ifSupportTstLabel": {
- "message": "ツリー型タブに対応(Firefox57++)"
- },
+
+
"saveLabel": {
"message": "保存"
},
@@ -71,10 +49,131 @@
"noSessionLabel": {
"message": "セッションはありません"
},
+
+
+ "settingsLabel": {
+ "message": "設定"
+ },
+ "sessionsLabel": {
+ "message": "セッション"
+ },
+ "informationLabel": {
+ "message": "情報"
+ },
+ "ifOpenNewWindowLabel": {
+ "message": "セッションを新しいウィンドウで開く"
+ },
+ "ifOpenNewWindowCaptionLabel": {
+ "message": "チェックをオフにすると,セッションは現在のウィンドウを上書きします。"
+ },
+ "ifAutoSaveLabel": {
+ "message": "定期的にセッションを保存する"
+ },
+ "ifAutoSaveCaptionLabel": {
+ "message": "設定した時間ごとにセッションを保存します。"
+ },
+ "autoSaveIntervalLabel": {
+ "message": "保存間隔(分)"
+ },
+ "autoSaveIntervalCaptionLabel": {
+ "message": "最小値 0.1"
+ },
+ "autoSaveLimitLabel": {
+ "message": "上限保存数"
+ },
+ "autoSaveLimitCaptionLabel": {
+ "message": "この方法で保存できるセッションの上限"
+ },
+ "ifAutoSaveWhenCloseLabel": {
+ "message": "ウィンドウを閉じたときにセッションを保存する"
+ },
+ "ifAutoSaveWhenCloseCaptionLabel": {
+ "message": "ウィンドウを閉じたときやfirefoxの終了時にセッションを保存します。"
+ },
+ "autoSaveWhenCloseLimitLabel": {
+ "message": "上限保存数"
+ },
+ "autoSaveWhenCloseCaptionLabel": {
+ "message": "この方法で保存できるセッションの上限"
+ },
+ "dateFormatLabel": {
+ "message": "日付のフォーマット"
+ },
+ "dateFormatCaptionLabel": {
+ "message": "例 YYYY.MM.DD HH:mm:ss"
+ },
+ "ifSupportTstLabel": {
+ "message": "ツリー型タブに対応"
+ },
+ "ifSupportTstCaptionLabel": {
+ "message": "ツリー型タブのツリーの状態を復元します。
fireFox57未満ではオフにしてください。"
+ },
"importLabel": {
+ "message": "セッションをインポート"
+ },
+ "importCaptionLabel": {
+ "message": "コンピュータに保存されたセッションを読み込んで現在のセッションに追加します。
Session Managerのセッションファイル(.session)にも対応しています。"
+ },
+ "importButtonLabel": {
+ "message": "参照..."
+ },
+ "importSaveButtonLabel": {
"message": "インポート"
},
+ "importClearButtonLabel": {
+ "message": "クリア"
+ },
"exportLabel": {
+ "message": "セッションをエクスポート"
+ },
+ "exportCaptionLabel": {
+ "message": "現在のセッションをコンピュータに保存します。"
+ },
+ "exportButtonLabel": {
"message": "エクスポート"
+ },
+ "removeSessionsLabel": {
+ "message": "セッションを削除"
+ },
+ "removeSessionsCaptionLabel": {
+ "message": "現在のセッションを全て削除します。"
+ },
+ "removeSessionsButtonLabel": {
+ "message": "削除"
+ },
+ "LicenseLabel": {
+ "message": "ライセンス"
+ },
+ "donationLabel": {
+ "message": "ご寄付のお願い"
+ },
+ "donationCaptionLabel": {
+ "message": "Tab Session Managerをご利用いただきありがとうございます。
アドオンの開発を続けていく上で,皆様のご支援が大きな励みになります。
もしあなたがTab Session Managerを気に入ってくれたなら,ご寄付をご検討いただけると幸いです。
ご寄付はamazon.co.jpのamazonギフト券で受け付けております。
Eメールタイプをご購入いただき,以下のメールアドレス宛てにお送りください。
email: sienori.firefox@gmail.com"
+ },
+ "amazonTitleLabel": {
+ "message": "amazonギフト券 Eメールタイプ"
+ },
+ "addonPageLabel": {
+ "message": "アドオンページ"
+ },
+
+
+ "importMessage": {
+ "message": "セッションをインポートしました。"
+ },
+ "readFailedMessage": {
+ "message": "読み込み失敗"
+ },
+ "warningRemoveAllMessage": {
+ "message": "全てのセッションを削除します。よろしいですか?"
+ },
+ "sessionLabel": {
+ "message": "セッション"
+ },
+ "sessionsLabel": {
+ "message": "セッション"
+ },
+ "amazonUrl": {
+ "message": "https://www.amazon.co.jp/dp/B004N3APGO?language=ja_JP"
}
}
diff --git a/Tab-Session-Manager/_locales/zh_CN/messages.json b/Tab-Session-Manager/_locales/zh_CN/messages.json
index 3c9a96440..f8a18ea0d 100644
--- a/Tab-Session-Manager/_locales/zh_CN/messages.json
+++ b/Tab-Session-Manager/_locales/zh_CN/messages.json
@@ -5,30 +5,8 @@
"extDescription": {
"message": "保存和还原窗口及标签页的状态。支持自动保存。"
},
- "ifOpenNewWindowLabel": {
- "message": "新建窗口打开会话"
- },
- "ifAutoSaveLabel": {
- "message": "定期保存已打开标签页的状态"
- },
- "autoSaveIntervalLabel": {
- "message": "间隔(分钟):"
- },
- "autoSaveLimitLabel": {
- "message": "以这种方式保存的最大数量:"
- },
- "ifAutoSaveWhenCloseLabel": {
- "message": "关闭窗口时保存会话"
- },
- "autoSaveWhenCloseLimitLabel": {
- "message": "以这种方式保存的最大数量 : "
- },
- "dateFormatLabel": {
- "message": "日期格式(例如 YYYY.MM.DD HH:mm:ss):"
- },
- "ifSupportTstLabel": {
- "message": "支持树样式选项卡(Firefox57 ++)"
- },
+
+
"saveLabel": {
"message": "保存"
},
@@ -71,10 +49,132 @@
"noSessionLabel": {
"message": "没有会话"
},
+
+
+ "settingsLabel": {
+ "message": "Settings"
+ },
+ "sessionsLabel": {
+ "message": "Sessions"
+ },
+ "informationLabel": {
+ "message": "Information"
+ },
+ "ifOpenNewWindowLabel": {
+ "message": "新建窗口打开会话"
+ },
+ "ifOpenNewWindowCaptionLabel": {
+ "message": "If checked off, the session overwrites the current window."
+ },
+ "ifAutoSaveLabel": {
+ "message": "定期保存已打开标签页的状态"
+ },
+ "ifAutoSaveCaptionLabel": {
+ "message": "Save the session every set time."
+ },
+ "autoSaveIntervalLabel": {
+ "message": "间隔(分钟)"
+ },
+ "autoSaveIntervalCaptionLabel": {
+ "message": "Minimum value 0.1"
+ },
+ "autoSaveLimitLabel": {
+ "message": "最大数量"
+ },
+ "autoSaveLimitCaptionLabel": {
+ "message": "Maximum number of saved sessions in this way."
+ },
+ "ifAutoSaveWhenCloseLabel": {
+ "message": "关闭窗口时保存会话"
+ },
+ "ifAutoSaveWhenCloseCaptionLabel": {
+ "message": "Save the session when closing the window or when exiting firefox."
+ },
+ "autoSaveWhenCloseLimitLabel": {
+ "message": "最大数量"
+ },
+ "autoSaveWhenCloseCaptionLabel": {
+ "message": "Maximum number of saved sessions in this way."
+ },
+ "dateFormatLabel": {
+ "message": "日期格式"
+ },
+ "dateFormatCaptionLabel": {
+ "message": "例如 YYYY.MM.DD HH:mm:ss"
+ },
+ "ifSupportTstLabel": {
+ "message": "支持树样式选项卡"
+ },
+ "ifSupportTstCaptionLabel": {
+ "message": "Restore tree state of Tree Style Tab.
Please turn it off if it is less than fireFox 57."
+ },
"importLabel": {
- "message": "进口"
+ "message": "Import sessions"
+ },
+ "importCaptionLabel": {
+ "message": "Load sessions saved on the computer and add them to the current session.
It also supports SessionManager's session file (.session)."
+ },
+ "importButtonLabel": {
+ "message": "Reference..."
+ },
+ "importSaveButtonLabel": {
+ "message": "Import"
+ },
+ "importClearButtonLabel": {
+ "message": "Clear"
},
"exportLabel": {
- "message": "出口"
+ "message": "Export Sessions"
+ },
+ "exportCaptionLabel": {
+ "message": "Save the current session on the computer."
+ },
+ "exportButtonLabel": {
+ "message": "Export"
+ },
+ "removeSessionsLabel": {
+ "message": "Delete sessions"
+ },
+ "removeSessionsCaptionLabel": {
+ "message": "Delete all current sessions."
+ },
+ "removeSessionsButtonLabel": {
+ "message": "Delete"
+ },
+ "LicenseLabel": {
+ "message": "License"
+ },
+ "donationLabel": {
+ "message": "Please make a donation"
+ },
+ "donationCaptionLabel": {
+ "message": "Thank you for using Tab Session Manager.
Your support will be a big encouragement as I continue to develop the add-on.
If you like Tab Session Manager,I would be pleased if you could consider donation.
Donation is accepted with eGift Cards of amazon.co.jp.
Please purchase an eGift Cards and send it to the following e-mail address.
email: sienori.firefox@gmail.com"
+ },
+ "amazonTitleLabel": {
+ "message": "amazon.co.jp eGift Cards"
+ },
+ "addonPageLabel": {
+ "message": "add-on page"
+ },
+
+
+
+ "importMessage": {
+ "message": "Sessions imported."
+ },
+ "readFailedMessage": {
+ "message": "Read failed"
+ },
+ "warningRemoveAllMessage": {
+ "message": "Delete all sessions. Is it OK?"
+ },
+ "sessionLabel": {
+ "message": "Session"
+ },
+ "sessionsLabel": {
+ "message": "Sessions"
+ },
+ "amazonUrl": {
+ "message": "https://www.amazon.co.jp/dp/B004N3APGO?language=zh_CN"
}
}
diff --git a/Tab-Session-Manager/_locales/zh_TW/messages.json b/Tab-Session-Manager/_locales/zh_TW/messages.json
index 891c8b384..4826d0afa 100644
--- a/Tab-Session-Manager/_locales/zh_TW/messages.json
+++ b/Tab-Session-Manager/_locales/zh_TW/messages.json
@@ -5,30 +5,8 @@
"extDescription": {
"message": "儲存與還原視窗跟分頁的瀏覽狀態。也支援自動儲存功能。"
},
- "ifOpenNewWindowLabel": {
- "message": "於新視窗中開啟工作階段"
- },
- "ifAutoSaveLabel": {
- "message": "定期將開啟的分頁瀏覽狀態自動儲存"
- },
- "autoSaveIntervalLabel": {
- "message": "儲存間隔(分鐘) : "
- },
- "autoSaveLimitLabel": {
- "message": "以這種方式儲存的最大數量 : "
- },
- "ifAutoSaveWhenCloseLabel": {
- "message": "關閉視窗時儲存工作階段"
- },
- "autoSaveWhenCloseLimitLabel": {
- "message": "以這種方式儲存的最大數量 : "
- },
- "dateFormatLabel": {
- "message": "日期格式(例如 YYYY.MM.DD HH:mm:ss) : "
- },
- "ifSupportTstLabel": {
- "message": "支援樹狀分頁(Firefox57 ++)"
- },
+
+
"saveLabel": {
"message": "儲存"
},
@@ -71,10 +49,132 @@
"noSessionLabel": {
"message": "沒有已儲存的工作階段"
},
+
+
+ "settingsLabel": {
+ "message": "Settings"
+ },
+ "sessionsLabel": {
+ "message": "Sessions"
+ },
+ "informationLabel": {
+ "message": "Information"
+ },
+ "ifOpenNewWindowLabel": {
+ "message": "於新視窗中開啟工作階段"
+ },
+ "ifOpenNewWindowCaptionLabel": {
+ "message": "If checked off, the session overwrites the current window."
+ },
+ "ifAutoSaveLabel": {
+ "message": "定期將開啟的分頁瀏覽狀態自動儲存"
+ },
+ "ifAutoSaveCaptionLabel": {
+ "message": "Save the session every set time."
+ },
+ "autoSaveIntervalLabel": {
+ "message": "儲存間隔(分鐘) : "
+ },
+ "autoSaveIntervalCaptionLabel": {
+ "message": "Minimum value 0.1"
+ },
+ "autoSaveLimitLabel": {
+ "message": "最大數量"
+ },
+ "autoSaveLimitCaptionLabel": {
+ "message": "Maximum number of saved sessions in this way."
+ },
+ "ifAutoSaveWhenCloseLabel": {
+ "message": "關閉視窗時儲存工作階段"
+ },
+ "ifAutoSaveWhenCloseCaptionLabel": {
+ "message": "Save the session when closing the window or when exiting firefox."
+ },
+ "autoSaveWhenCloseLimitLabel": {
+ "message": "最大數量"
+ },
+ "autoSaveWhenCloseCaptionLabel": {
+ "message": "Maximum number of saved sessions in this way."
+ },
+ "dateFormatLabel": {
+ "message": "日期格式"
+ },
+ "dateFormatCaptionLabel": {
+ "message": "例如 YYYY.MM.DD HH:mm:ss"
+ },
+ "ifSupportTstLabel": {
+ "message": "支援樹狀分頁"
+ },
+ "ifSupportTstCaptionLabel": {
+ "message": "Restore tree state of Tree Style Tab.
Please turn it off if it is less than fireFox 57."
+ },
"importLabel": {
+ "message": "Import sessions"
+ },
+ "importCaptionLabel": {
+ "message": "Load sessions saved on the computer and add them to the current session.
It also supports SessionManager's session file (.session)."
+ },
+ "importButtonLabel": {
+ "message": "Reference..."
+ },
+ "importSaveButtonLabel": {
"message": "匯入"
},
+ "importClearButtonLabel": {
+ "message": "Clear"
+ },
"exportLabel": {
+ "message": "Export Sessions"
+ },
+ "exportCaptionLabel": {
+ "message": "Save the current session on the computer."
+ },
+ "exportButtonLabel": {
"message": "匯出"
+ },
+ "removeSessionsLabel": {
+ "message": "Delete sessions"
+ },
+ "removeSessionsCaptionLabel": {
+ "message": "Delete all current sessions."
+ },
+ "removeSessionsButtonLabel": {
+ "message": "Delete"
+ },
+ "LicenseLabel": {
+ "message": "License"
+ },
+ "donationLabel": {
+ "message": "Please make a donation"
+ },
+ "donationCaptionLabel": {
+ "message": "Thank you for using Tab Session Manager.
Your support will be a big encouragement as I continue to develop the add-on.
If you like Tab Session Manager,I would be pleased if you could consider donation.
Donation is accepted with eGift Cards of amazon.co.jp.
Please purchase an eGift Cards and send it to the following e-mail address.
email: sienori.firefox@gmail.com"
+ },
+ "amazonTitleLabel": {
+ "message": "amazon.co.jp eGift Cards"
+ },
+ "addonPageLabel": {
+ "message": "add-on page"
+ },
+
+
+
+ "importMessage": {
+ "message": "Sessions imported."
+ },
+ "readFailedMessage": {
+ "message": "Read failed"
+ },
+ "warningRemoveAllMessage": {
+ "message": "Delete all sessions. Is it OK?"
+ },
+ "sessionLabel": {
+ "message": "Session"
+ },
+ "sessionsLabel": {
+ "message": "Sessions"
+ },
+ "amazonUrl": {
+ "message": "https://www.amazon.co.jp/dp/B004N3APGO?language=zh_CN"
}
}
diff --git a/Tab-Session-Manager/background.js b/Tab-Session-Manager/background.js
index 24fe2751e..dc657aadf 100644
--- a/Tab-Session-Manager/background.js
+++ b/Tab-Session-Manager/background.js
@@ -3,14 +3,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//初回起動時にオプションページを表示して設定を初期化
-browser.runtime.onInstalled.addListener(function(){
+browser.runtime.onInstalled.addListener(function () {
browser.runtime.openOptionsPage();
});
let S = new settingsObj()
var sessions = [];
-var sessionStartTime=Date.now();
+var sessionStartTime = Date.now();
//起動時の設定
initSettings().then(function () {
@@ -28,7 +28,7 @@ function initSettings(value) {
//sessions初期化
if (value.sessions != undefined) sessions = value.sessions;
else sessions = [];
-
+
S.init();
resolve();
});
@@ -146,7 +146,7 @@ function loadCurrentSesssion(name, tag) {
session.name = name;
session.date = new Date();
session.tag = tag;
- session.sessionStartTime=sessionStartTime;
+ session.sessionStartTime = sessionStartTime;
//windouwsとtabのセット
for (let tab of tabs) {
@@ -171,7 +171,7 @@ function ifChangedAutoSaveSession(session) {
}
//自動保存が無ければtrue
if (lastAutoNumber == -1) return true;
-
+
//前回保存時のセッション
let lastItems = [];
for (let win in sessions[lastAutoNumber].windows) {
@@ -217,7 +217,7 @@ function showSessionWhenWindowClose(session) {
}
//sessionStartTimeが異なればFirefoxの再起動されたと見なしshowFlag=true
- if(sessions[i].sessionStartTime!=session.sessionStartTime) showFlag=true;
+ if (sessions[i].sessionStartTime != session.sessionStartTime) showFlag = true;
//保存が必要ならクラスからtempを削除し表示する
if (showFlag) {
@@ -282,18 +282,18 @@ function removeNowOpenTabs() {
//現在のウィンドウにタブを生成
function createTabs(session, win, currentWindow) {
return new Promise(function (resolve, reject) {
- let sortedTabs=[];
-
- for(let tab in session.windows[win]){
- sortedTabs[session.windows[win][tab].index]=session.windows[win][tab];
+ let sortedTabs = [];
+
+ for (let tab in session.windows[win]) {
+ sortedTabs[session.windows[win][tab].index] = session.windows[win][tab];
}
//console.log(sortedTabs);
-
+
let firstTabId = currentWindow.tabs[0].id;
let tabNumber = 0;
let p = Promise.resolve();
for (let tab of sortedTabs) { //タブごと
-
+
p = p.then(function () {
tabNumber++;
return openTab(session, win, currentWindow, tab.id);
diff --git a/Tab-Session-Manager/manifest.json b/Tab-Session-Manager/manifest.json
index 751e3eaf3..14935e1cc 100644
--- a/Tab-Session-Manager/manifest.json
+++ b/Tab-Session-Manager/manifest.json
@@ -15,7 +15,8 @@
"permissions": ["storage", "unlimitedStorage", "tabs", "cookies", "downloads"],
"options_ui": {
- "page": "options/options.html"
+ "page": "options/options.html",
+ "open_in_tab": true
},
"icons": {
diff --git a/Tab-Session-Manager/options/options.css b/Tab-Session-Manager/options/options.css
index df6dd10cc..3d7c7040b 100644
--- a/Tab-Session-Manager/options/options.css
+++ b/Tab-Session-Manager/options/options.css
@@ -1,68 +1,277 @@
+:root {
+ --main-text: #0c0c0d;
+ --sub-text: #737373;
+ --line: #ededf0;
+ --button: #d7d7db;
+ --highlight: #36b2b2;
+ --main-bg: #ffffff;
+}
+
body {
+ font-family: 'Segoe UI', 'San Francisco', 'Ubuntu', 'Fira Sans', 'Roboto', 'Arial', 'Helvetica', sans-serif;
+ font-size: 15px;
+ font-weight: 400;
+ color: var(--main-text);
+ background-color: var(--main-bg);
+ line-height: 1.5;
+ display: flex;
+ flex-direction: row;
+
+}
+
+p {
+ margin: 0px;
+}
+
+ul {
+ padding: 0px;
+}
+
+li {
+ list-style-type: none;
+}
+
+hr {
+ width: 100%;
+ background-color: var(--line);
+ height: 1px;
+ border: none;
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
+
+
+/*----sidebar----*/
+
+#sidebar {
+ font-size: 17px;
+ font-weight: 400;
+ text-align: right;
+ -moz-user-select: none;
+}
+
+.titleContainer {
+ display: flex;
+ flex-direction: row;
+}
+
+.logo {
+ height: 64px;
+ width: 64px;
+}
+
+.logotitle {
+ text-align: left;
font-size: 13px;
- background-color: #f9f9fa;
+ font-weight: 300;
+ color: var(--highlight);
+ margin: auto;
}
-input {
- font-family: inherit;
+.sidebarItem:hover {
+ text-decoration-line: underline;
}
-#autoSaveInterval,
-#autoSaveLimit,
-#autoSaveWhenCloseLimit {
- width: 50px;
+#sidebar > ul {
+ padding-left: 40px;
}
-#dateFormat {
- width: 220px;
+#sidebar > ul > li {
+ padding: 10px 15px;
}
-input[type="number"] {
- -moz-appearance: textfield;
+#sidebar .selected {
+ color: var(--highlight);
+}
+
+
+/*----contents----*/
+
+#contents {
+ padding-top: 20px;
+ padding-left: 20px;
+ width: 650px;
+}
+
+.contentTitle {
+ font-size: 33px;
+ font-weight: 200;
+ color: var(--sub-text);
+ line-height: 2;
+}
+
+.caption {
+ font-size: 13px;
+ font-weight: 400;
+ color: var(--sub-text);
+}
+
+#contents ul {
+ margin: 0px;
+}
+
+#contents .childElement {
+ padding-left: 20px;
+ margin-bottom: 30px;
+ border-left: solid 10px var(--line);
+}
+
+.optionContainer {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ padding: 10px 0px 10px 0px;
+}
+
+.buttonsContainer {
+ justify-content: flex-start;
+}
+
+.optionText {
+ flex: 1;
}
-#save {
- width: auto;
+.optionForm {
+ flex-basis: 150px;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+}
+
+#importClear {
+ position: relative;
+ left: 10px;
+}
+
+.favicon {
+ width: 18px;
+ height: 18px;
+ padding: 1px;
+ display: block;
+ float: left;
+}
+
+
+/*----forms----*/
+
+input {
+ font-family: inherit;
+ font-size: 14px;
+}
+
+input[type="number"],
+input[type="text"] {
+ -moz-appearance: textfield;
+ width: 50px;
height: 30px;
- margin-left: auto;
- color: #111;
- border: 1px solid #bbb;
+ padding-left: 5px;
+ padding-right: 5px;
+ border: 1px solid var(--button);
border-radius: 2px;
- background-color: #fbfbfb;
}
-#save:hover {
- background: #f5f5f5;
+input[type="number"]:hover,
+input[type="text"]:hover {
+ border-color: var(--highlight);
}
-.button{
- display: inline-block;
- width: 80px;
+input[type="text"] {
+ width: 200px;
+}
+
+.button {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ min-width: 100px;
text-align: center;
padding: 5px;
height: 30px;
- color: #111;
- border: 1px solid #bbb;
+ font-size: 13px;
+ color: var(--main-text);
+ border: 1px solid var(--button);
border-radius: 2px;
background-color: #fbfbfb;
+ cursor: pointer;
+
+ white-space: nowrap;
}
-.button:hover{
+.includeSpan {
+ padding: 0px;
+ height: 28px;
+}
+
+.button:hover {
background: #f5f5f5;
+ border-color: var(--highlight);
}
-label {
- padding: 3px 0px;
+::-moz-selection {
+ background: var(--line);
}
-hr {
+a:link {
+ color: var(--sub-text);
+ text-decoration-line: none;
+}
- width: 100%;
- background-color: #d7d7db;
- height: 1px;
- border: none;
+
+a:visited {
+ color: var(--sub-text);
}
-::-moz-selection {
- background: #ebebeb;
+.pageLink {
+ color: var(--highlight);
+ display: inline-block;
+ margin-right: 10px;
+}
+
+.pageLink:hover {
+ color: var(--highlight);
+ text-decoration-line: underline;
+}
+
+input[type="checkbox"] {
+ display: none;
+}
+
+.checkbox {
+ padding-left: 20px;
+ position: relative;
+ /*margin-right: 20px;*/
+ cursor: pointer;
+}
+
+.checkbox::before {
+ content: "";
+ display: block;
+ position: absolute;
+ top: 0;
+ left: -2px;
+ width: 20px;
+ height: 20px;
+ border: 1px solid var(--button);
+ border-radius: 2px;
+}
+
+.checkbox:hover::before {
+ border-color: var(--highlight);
+}
+
+input[type="checkbox"]:checked + .checkbox {
+ color: var(--highlight);
+}
+
+input[type="checkbox"]:checked + .checkbox::after {
+ content: "";
+ display: block;
+ position: absolute;
+ top: 1px;
+ left: 4px;
+ width: 6px;
+ height: 14px;
+ transform: rotate(40deg);
+ border-bottom: 3px solid #009a9a;
+ border-right: 3px solid #009a9a;
}
diff --git a/Tab-Session-Manager/options/options.html b/Tab-Session-Manager/options/options.html
index 55c557518..aa42323fc 100644
--- a/Tab-Session-Manager/options/options.html
+++ b/Tab-Session-Manager/options/options.html
@@ -4,63 +4,296 @@