From 4662fa06b4f13d52ad33cfa5fe793e75d01e10b2 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Tue, 25 Mar 2014 01:28:53 -0400
Subject: Generate a file download link to easily save the data
---
chrome-get-urls-from-tabs-in-windows.js | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index 4fdcefb..6f957cd 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -1,4 +1,6 @@
var textarea = document.getElementById('copy-area');
+var create_download_link;
+var generate_filename;
chrome.windows.getAll({populate:true},function(windows){
var w_index = 0;
@@ -18,4 +20,33 @@ chrome.windows.getAll({populate:true},function(windows){
w_index++;
});
-});
\ No newline at end of file
+
+ create_download_link(textarea.value);
+});
+
+
+create_download_link = function(text) {
+ var download_link = document.createElement('a');
+ download_link.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
+ download_link.setAttribute('download', generate_filename());
+ download_link.innerHTML = 'Download file';
+
+ document.querySelector('body').appendChild(download_link);
+};
+
+
+generate_filename = function() {
+ var d = new Date();
+ var date_string =
+ d.getFullYear()
+ + ''
+ + ('0' + (d.getMonth() + 1)).slice(-2)
+ + ''
+ + ('0' + d.getDate()).slice(-2)
+ + '-'
+ + ('0' + d.getHours()).slice(-2)
+ + 'h'
+ + d.getMinutes();
+
+ return 'chrome-tabs-' + date_string + '.txt';
+};
\ No newline at end of file
--
cgit v1.2.3
From b616a09961447ef569f8674e830c050d2ca160a8 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Tue, 25 Mar 2014 01:29:29 -0400
Subject: Update header time function for leading zero in hours
Add leading zero to hours.
---
page.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/page.js b/page.js
index e8a60d2..987fe85 100644
--- a/page.js
+++ b/page.js
@@ -7,7 +7,7 @@
+ ''
+ ('0' + d.getDate()).slice(-2)
+ '-'
- + d.getHours()
+ + ('0' + d.getHours()).slice(-2)
+ 'h'
+ d.getMinutes();
--
cgit v1.2.3
From 8a6cae6d16075a2198177d1c678de17d7eed6f45 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 12:51:07 -0400
Subject: Add comment: where the file download code came from
---
chrome-get-urls-from-tabs-in-windows.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index 6f957cd..a689b0c 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -25,6 +25,8 @@ chrome.windows.getAll({populate:true},function(windows){
});
+// Adapted from:
+// http://stackoverflow.com/a/18197511
create_download_link = function(text) {
var download_link = document.createElement('a');
download_link.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
--
cgit v1.2.3
From b90db19d4b008bd74cb59800a167e9171609353a Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 12:55:34 -0400
Subject: Add TODO
---
TODO | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 TODO
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..31594dc
--- /dev/null
+++ b/TODO
@@ -0,0 +1,11 @@
+TODO
+====
+
+2014.03.30:
+- Better fonts
+- Move download link
+- Create options page
+- Default behaviour option: icon click downloads file or opens page
+- Format option: text, HTML, YAML
+- Add formats
+- Icon
--
cgit v1.2.3
From 420cd14f7bc70e66cc2f5ad216892a2c1243398c Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 13:01:28 -0400
Subject: Add options page
---
manifest.json | 2 ++
options.html | 13 +++++++++++++
2 files changed, 15 insertions(+)
create mode 100644 options.html
diff --git a/manifest.json b/manifest.json
index 635ea0e..d12f1ba 100644
--- a/manifest.json
+++ b/manifest.json
@@ -9,6 +9,8 @@
},
+ "options_page": "options.html",
+
"background": {
"scripts": ["background.js"],
"persistent": false
diff --git a/options.html b/options.html
new file mode 100644
index 0000000..70b72e6
--- /dev/null
+++ b/options.html
@@ -0,0 +1,13 @@
+
+
+
+ Chrome Copy URLs From All Tabs - Options
+
+
+
+
+ TEST
+
+
--
cgit v1.2.3
From ac429d43a996010bbd8f05bdde2cfc0e3b33a90d Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 13:01:42 -0400
Subject: Style URL page header
---
chrome-get-urls-from-tabs-in-windows.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome-get-urls-from-tabs-in-windows.html b/chrome-get-urls-from-tabs-in-windows.html
index 3d2fbf8..23bc74e 100644
--- a/chrome-get-urls-from-tabs-in-windows.html
+++ b/chrome-get-urls-from-tabs-in-windows.html
@@ -6,7 +6,7 @@
--
cgit v1.2.3
From f297163939809ad8b1ebb0402bf945dc66221834 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 13:02:42 -0400
Subject: Fix bug with date format minutes
Add leading zero.
---
page.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/page.js b/page.js
index 987fe85..2c9b630 100644
--- a/page.js
+++ b/page.js
@@ -9,7 +9,7 @@
+ '-'
+ ('0' + d.getHours()).slice(-2)
+ 'h'
- + d.getMinutes();
+ + ('0' + d.getMinutes()).slice(-2);
var header_text = 'chrome-tabs-' + date_string;
document.getElementById('header').innerHTML = header_text;
--
cgit v1.2.3
From 6cf6a0ed3c18e28e76a37eb2fbfec7700936a594 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 13:04:58 -0400
Subject: Use monospace type in textarea
---
chrome-get-urls-from-tabs-in-windows.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome-get-urls-from-tabs-in-windows.html b/chrome-get-urls-from-tabs-in-windows.html
index 23bc74e..a45f70a 100644
--- a/chrome-get-urls-from-tabs-in-windows.html
+++ b/chrome-get-urls-from-tabs-in-windows.html
@@ -4,7 +4,7 @@
Chrome Copy URLs From All Tabs
--
cgit v1.2.3
From f3da89298d586352066b4f1c6661af3a0abc7f54 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 13:05:52 -0400
Subject: Update TODO
---
TODO | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TODO b/TODO
index 31594dc..70c8ff7 100644
--- a/TODO
+++ b/TODO
@@ -2,9 +2,9 @@ TODO
====
2014.03.30:
-- Better fonts
+v Better fonts
- Move download link
-- Create options page
+v Create options page
- Default behaviour option: icon click downloads file or opens page
- Format option: text, HTML, YAML
- Add formats
--
cgit v1.2.3
From 5e42f11675bb301a4f9329e8e5d50ec136e6f0df Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 14:13:42 -0400
Subject: Update options page
* Copy sample code from the docs
http://developer.chrome.com/extensions/options
* Include Chrome UI Bootstrap CSS
https://github.com/roykolak/chrome-bootstrap
---
chrome-bootstrap.css | 683 +++++++++++++++++++++++++++++++++++++++++++++++++++
options.html | 36 ++-
options.js | 32 +++
3 files changed, 748 insertions(+), 3 deletions(-)
create mode 100644 chrome-bootstrap.css
create mode 100644 options.js
diff --git a/chrome-bootstrap.css b/chrome-bootstrap.css
new file mode 100644
index 0000000..c307d5b
--- /dev/null
+++ b/chrome-bootstrap.css
@@ -0,0 +1,683 @@
+.chrome-bootstrap {
+ font-family: 'Chrome Droid Sans', 'Droid Sans Fallback', 'Lucida Grande', sans-serif;
+ font-size: 12px;
+ color: #303942;
+ cursor: default;
+ margin: 0;
+ /* Headings
+ ============================================== */
+
+ /* Layout
+ ============================================== */
+
+ /* Header
+ ============================================== */
+
+ /* View sections
+ ============================================== */
+
+ /* Control bar
+ ============================================== */
+
+ /* Pagination
+ ============================================== */
+
+ /* Alert
+ ============================================== */
+
+ /* Tags
+ ============================================== */
+
+ /* Main menu
+ ============================================== */
+
+ /* Icons
+ ============================================== */
+
+ /* Highlightable list
+ ============================================== */
+
+ /* Input styling
+ ============================================== */
+
+ /* Focused --------------------------------- */
+
+ /* Disabled --------------------------------- */
+
+ /* Hovering --------------------------------- */
+
+ /* Active --------------------------------- */
+
+ /* Modal
+ ============================================== */
+
+}
+.chrome-bootstrap a {
+ border: none;
+ color: #15C;
+ cursor: pointer;
+ text-decoration: underline;
+ font-weight: normal;
+}
+.chrome-bootstrap a:hover,
+.chrome-bootstrap a:focus {
+ outline: none;
+}
+.chrome-bootstrap ul,
+.chrome-bootstrap ol {
+ padding: 0;
+}
+.chrome-bootstrap li {
+ list-style-type: none;
+}
+.chrome-bootstrap dl,
+.chrome-bootstrap dt,
+.chrome-bootstrap dd {
+ margin: 0;
+}
+.chrome-bootstrap button {
+ cursor: pointer;
+}
+.chrome-bootstrap h1,
+.chrome-bootstrap h2,
+.chrome-bootstrap h3,
+.chrome-bootstrap h4 {
+ -webkit-user-select: none;
+ font-weight: normal;
+ line-height: 1;
+}
+.chrome-bootstrap h1 small,
+.chrome-bootstrap h2 small,
+.chrome-bootstrap h3 small,
+.chrome-bootstrap h4 small {
+ font-size: 15px;
+ margin: 0 10px;
+ color: #53637D;
+}
+.chrome-bootstrap h1 {
+ -webkit-margin-after: 1em;
+ -webkit-margin-before: 21px;
+ -webkit-margin-start: 23px;
+ height: 18px;
+ font-size: 18px;
+}
+.chrome-bootstrap h1 a {
+ color: #5C6166;
+ text-decoration: none;
+}
+.chrome-bootstrap h3 {
+ color: black;
+ font-size: 1.2em;
+ margin-bottom: 0.8em;
+}
+.chrome-bootstrap h4 {
+ font-size: 1em;
+ margin-bottom: 5px;
+}
+.chrome-bootstrap .frame .navigation {
+ height: 100%;
+ -webkit-margin-start: 0;
+ position: fixed;
+ -webkit-margin-end: 15px;
+ width: 155px;
+ z-index: 3;
+}
+.chrome-bootstrap .frame .view,
+.chrome-bootstrap .frame .content {
+ width: 738px;
+ overflow-x: hidden;
+}
+.chrome-bootstrap .frame .content {
+ padding-top: 55px;
+}
+.chrome-bootstrap .frame .content p {
+ text-align: justify;
+}
+.chrome-bootstrap .frame .with_controls .content {
+ padding-top: 104px;
+}
+.chrome-bootstrap .frame .view {
+ -webkit-margin-start: 155px;
+}
+.chrome-bootstrap .frame .view a {
+ font: inherit;
+}
+.chrome-bootstrap .frame .mainview > * {
+ -webkit-margin-start: -20px;
+ -webkit-transition: margin 100ms, opacity 100ms;
+ opacity: 0;
+ z-index: 0;
+ position: absolute;
+ top: 0;
+ display: block;
+}
+.chrome-bootstrap .frame .mainview > .selected {
+ -webkit-margin-start: 0;
+ -webkit-transition: margin 200ms, opacity 200ms;
+ -webkit-transition-delay: 100ms;
+ z-index: 1;
+ opacity: 1;
+}
+.chrome-bootstrap header {
+ position: fixed;
+ background-image: -webkit-linear-gradient(#ffffff, #ffffff 40%, rgba(255, 255, 255, 0.92));
+ width: 738px;
+ z-index: 2;
+}
+.chrome-bootstrap header h1 {
+ padding: 21px 0 13px;
+ margin: 0;
+ border-bottom: 1px solid #EEE;
+}
+.chrome-bootstrap header .corner {
+ position: absolute;
+ right: 0px;
+ top: 21px;
+}
+.chrome-bootstrap header .corner input[type="text"] {
+ width: 210px;
+}
+.chrome-bootstrap header .corner.cancelable .delete {
+ opacity: 1;
+ top: 4px;
+ right: 5px;
+}
+.chrome-bootstrap section {
+ -webkit-padding-start: 18px;
+ margin-bottom: 24px;
+ margin-top: 8px;
+ max-width: 600px;
+}
+.chrome-bootstrap section h3 {
+ -webkit-margin-start: -18px;
+}
+.chrome-bootstrap section .row {
+ display: block;
+ margin: 0.65em 0;
+}
+.chrome-bootstrap .controls {
+ -webkit-padding-end: 3px;
+ -webkit-padding-start: 4px;
+ -webkit-transition: padding 100ms, height 100ms, opacity 100ms;
+ border-bottom: 1px solid #EEE;
+ display: -webkit-box;
+ overflow: hidden;
+ padding: 13px 0;
+ position: relative;
+}
+.chrome-bootstrap .controls .text {
+ display: inline-block;
+ margin-top: 4px;
+}
+.chrome-bootstrap .controls .spacer {
+ -webkit-box-flex: 1;
+}
+.chrome-bootstrap ol.pagination li {
+ margin: 0 2px;
+ display: inline-block;
+ line-height: 25px;
+}
+.chrome-bootstrap ol.pagination a {
+ width: 25px;
+ height: 24px;
+ text-align: center;
+ display: block;
+ background: #F0F6FE;
+ text-decoration: none;
+}
+.chrome-bootstrap ol.pagination a:hover,
+.chrome-bootstrap ol.pagination a.selected {
+ background: #8AAAED;
+ color: #FFF;
+}
+.chrome-bootstrap .alert {
+ border-radius: 3px;
+ background: rgba(147, 184, 252, 0.2);
+ display: block;
+ position: relative;
+ padding: 10px 30px 10px 10px;
+ line-height: 17px;
+}
+.chrome-bootstrap .alert .delete {
+ top: 5px;
+ right: 6px;
+ opacity: 1;
+}
+.chrome-bootstrap ul.tags li {
+ background: #8AAAED;
+ color: #FFF;
+ border-radius: 3px;
+ position: relative;
+ display: inline-block;
+ padding: 2px 5px;
+}
+.chrome-bootstrap ul.tags li a {
+ color: #FFF;
+ text-decoration: none;
+}
+.chrome-bootstrap ul.tags li a:hover {
+ text-decoration: underline;
+}
+.chrome-bootstrap ul.tags li .delete {
+ opacity: 1;
+ position: relative;
+ display: inline-block;
+ width: 13px;
+ height: 12px;
+ top: 1px;
+ background-position-y: -1px;
+}
+.chrome-bootstrap ul.menu {
+ -webkit-margin-before: 1em;
+ -webkit-margin-after: 2em;
+ -webkit-margin-start: 0px;
+ -webkit-margin-end: 0px;
+ -webkit-padding-start: 40px;
+ list-style-type: none;
+ padding: 0;
+}
+.chrome-bootstrap ul.menu li {
+ -webkit-border-start: 6px solid transparent;
+ -webkit-padding-start: 18px;
+ -webkit-user-select: none;
+ display: list-item;
+ text-align: -webkit-match-parent;
+}
+.chrome-bootstrap ul.menu li.selected {
+ -webkit-border-start-color: #4e5764;
+}
+.chrome-bootstrap ul.menu li.selected a {
+ color: #464E5A;
+}
+.chrome-bootstrap ul.menu li a {
+ border: 0;
+ color: #999;
+ cursor: pointer;
+ font: inherit;
+ line-height: 29px;
+ margin: 0;
+ padding: 0;
+ text-decoration: none;
+ display: block;
+}
+.chrome-bootstrap .arrow_collapse {
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 6px solid #999;
+ -webkit-margin-end: 4px;
+ top: 1px;
+}
+.chrome-bootstrap .arrow_expand {
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 7px solid #999;
+ -webkit-margin-end: 4px;
+}
+.chrome-bootstrap .arrow {
+ width: 0;
+ height: 0;
+ position: relative;
+ display: inline-block;
+}
+.chrome-bootstrap .delete {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==");
+ background-repeat: no-repeat;
+ display: block;
+ opacity: 0;
+ height: 14px;
+ width: 14px;
+ -webkit-transition: 150ms opacity;
+ background-color: transparent;
+ text-indent: -5000px;
+ position: absolute;
+}
+.chrome-bootstrap .delete:hover {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAqklEQVR4XqWRMQ6DMAxF/1Fyilyj2SmIBUG5QcTCyJA5Z8jGhlBPgRi4TmoDraVmKFJlWYrlp/g5QfwRlwEVNWVa4WzfH9jK6kCkEkBjwxOhLghheMWMELUAqqwQ4OCbnE4LJnhr5IYdqQt4DJQjhe9u4vBBmnxHHNzRFkDGjHDo0VuTAqy2vAG4NkvXXDHxbGsIGlj3e835VFNtdugma/Jk0eXq0lP//5svi4PtO01oFfYAAAAASUVORK5CYII=");
+}
+.chrome-bootstrap .highlightable li {
+ position: relative;
+ padding: 2px 0;
+}
+.chrome-bootstrap .highlightable li:hover > a:not(.action),
+.chrome-bootstrap .highlightable li a:not(.action):focus {
+ background-color: #F0F6FE;
+ color: #555;
+}
+.chrome-bootstrap .highlightable li:hover > .action {
+ opacity: 0.7;
+}
+.chrome-bootstrap .highlightable li a {
+ padding: 5px;
+ display: block;
+ position: relative;
+ z-index: 0;
+ text-decoration: none;
+}
+.chrome-bootstrap .highlightable li dt {
+ font-size: 105%;
+ margin-bottom: 3px;
+}
+.chrome-bootstrap .highlightable li dd {
+ color: #999;
+ overflow: hidden;
+ white-space: nowrap;
+ font-size: 10px;
+ margin-top: 5px;
+}
+.chrome-bootstrap .highlightable li .tags {
+ float: left;
+ margin-top: -1px;
+ font-size: 12px;
+}
+.chrome-bootstrap .highlightable li .tags li:last-child {
+ margin-right: 5px;
+}
+.chrome-bootstrap .highlightable li .tags li:hover > a:not(.action) {
+ background: #8AAAED;
+ color: #FFF;
+}
+.chrome-bootstrap .highlightable li .tags li a {
+ padding: 0;
+}
+.chrome-bootstrap .highlightable li .action {
+ -webkit-appearance: none;
+ -webkit-transition: opacity 150ms;
+ background: #8AAAED;
+ border: none;
+ border-radius: 2px;
+ color: white;
+ opacity: 0;
+ margin-top: 0;
+ font-size: 10px;
+ padding: 1px 6px;
+ position: absolute;
+ top: 8px;
+ right: 32px;
+ -webkit-transition: 150ms opacity;
+ cursor: pointer;
+}
+.chrome-bootstrap .highlightable li .action:hover {
+ opacity: 1;
+}
+.chrome-bootstrap .highlightable li .highlightable {
+ -webkit-margin-start: 30px;
+}
+.chrome-bootstrap .highlightable.editable .delete {
+ position: absolute;
+ top: 7px;
+ right: 5px;
+}
+.chrome-bootstrap .highlightable.editable li:hover > .delete {
+ opacity: 1;
+}
+.chrome-bootstrap .match {
+ background: #f2f37b;
+ display: inline-block;
+ margin: 0 1px;
+}
+.chrome-bootstrap select,
+.chrome-bootstrap input[type='checkbox'],
+.chrome-bootstrap input[type='radio'],
+.chrome-bootstrap input[type='button'],
+.chrome-bootstrap button {
+ -webkit-appearance: none;
+ -webkit-user-select: none;
+ background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
+ border: 1px solid rgba(0, 0, 0, 0.25);
+ border-radius: 2px;
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+ color: #444;
+ font: inherit;
+ margin: 0 1px 0 0;
+ text-shadow: 0 1px 0 #F0F0F0;
+}
+.chrome-bootstrap button.small {
+ padding: 1px 5px 2px;
+ min-height: 1em;
+}
+.chrome-bootstrap input[type='checkbox']:checked::before {
+ -webkit-user-select: none;
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wDBhYcG79aGIsAAACbSURBVBjTjdFBCkFhFAXgj4fp24PBy0SZ2ICRXRgYGb2xlKzBSEo2YgsiKWVoZgFKMjD5X/2Ux6lb99bpnNO5lKMR5i8MsEQHkhJiEzlS9HCqfiFWMUIt3AfsC3KKLCL30Qr7HfM4Ro4h6rhiEqmusIMKuphGqo+ogSPGcbYLzh91vdkXSHDDBk+0gxussS3rNcMCs+D6E18/9gLPPhbDshfzLgAAAABJRU5ErkJggg==");
+ background-size: 100% 100%;
+ content: '';
+ display: block;
+ height: 100%;
+ width: 100%;
+}
+.chrome-bootstrap html[dir='rtl'] input[type='checkbox']:checked::before {
+ -webkit-transform: scaleX(-1);
+}
+.chrome-bootstrap input[type='radio']:checked::before {
+ background-color: #666;
+ border-radius: 100%;
+ bottom: 3px;
+ content: '';
+ display: block;
+ left: 3px;
+ position: absolute;
+ right: 3px;
+ top: 3px;
+}
+.chrome-bootstrap select {
+ -webkit-appearance: none;
+ -webkit-padding-end: 20px;
+ -webkit-padding-start: 6px;
+ /* OVERRIDE */
+
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAWklEQVQokWNgoAOIAuI0PDiKaJMSgYCZmfkbkPkfHYPEQfJEG/b//3+FBQsWLGRjY/uJbBCIDxIHyRNtGDYDyTYI3UA+Pr4vFBmEbODbt2+bKDYIyUBWYtQBAIRzRP/XKJ//AAAAAElFTkSuQmCC), -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
+ background-position: right center;
+ background-repeat: no-repeat;
+}
+.chrome-bootstrap select {
+ min-height: 2em;
+ min-width: 4em;
+}
+.chrome-bootstrap html[dir='rtl'] select {
+ background-position: center left;
+}
+.chrome-bootstrap input[type='checkbox'] {
+ bottom: 2px;
+ height: 13px;
+ position: relative;
+ vertical-align: middle;
+ width: 13px;
+}
+.chrome-bootstrap input[type='radio'] {
+ /* OVERRIDE */
+
+ border-radius: 100%;
+ bottom: 3px;
+ height: 15px;
+ position: relative;
+ vertical-align: middle;
+ width: 15px;
+}
+.chrome-bootstrap button {
+ -webkit-padding-end: 10px;
+ -webkit-padding-start: 10px;
+ min-height: 2em;
+ min-width: 4em;
+}
+.chrome-bootstrap input[type='text'],
+.chrome-bootstrap input[type='search'] {
+ border: 1px solid #BFBFBF;
+ border-radius: 2px;
+ box-sizing: border-box;
+ color: #444;
+ font: inherit;
+ margin: 0;
+ min-height: 2em;
+ padding: 3px;
+ padding-bottom: 4px;
+}
+.chrome-bootstrap .radio,
+.chrome-bootstrap .checkbox {
+ margin: 0.65em 0;
+}
+.chrome-bootstrap select:focus,
+.chrome-bootstrap input[type='checkbox']:focus,
+.chrome-bootstrap input[type='password']:focus,
+.chrome-bootstrap input[type='radio']:focus,
+.chrome-bootstrap input[type='search']:focus,
+.chrome-bootstrap input[type='text']:focus,
+.chrome-bootstrap button:focus {
+ /* OVERRIDE */
+
+ -webkit-transition: border-color 200ms;
+ /* We use border color because it follows the border radius (unlike outline).
+ * This is particularly noticeable on mac. */
+
+ border-color: #4d90fe;
+ outline: none;
+}
+.chrome-bootstrap button:disabled,
+.chrome-bootstrap select:disabled {
+ background-image: -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
+ border-color: rgba(80, 80, 80, 0.2);
+ box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+ color: #aaa;
+ cursor: default;
+}
+.chrome-bootstrap select:disabled {
+ /* OVERRIDE */
+
+ background-image: -webkit-image-set(url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAAXNSR0IArs4c6QAAAAd0SU1FB9sLAxYEBKriBmwAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAABLSURBVCiRY2CgA4gC4jQ8OIpokxKBoKGh4T8uDJIn2rD///8rLFiwYCE2g0DiIHkSfIndQLIMwmYgRQYhG/j27dsmig1CMpCVGHUAo8FcsHfxfXQAAAAASUVORK5CYII=") 1 x), -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
+}
+.chrome-bootstrap input[type='checkbox']:disabled,
+.chrome-bootstrap input[type='radio']:disabled {
+ opacity: .75;
+}
+.chrome-bootstrap input[type='search']:disabled,
+.chrome-bootstrap input[type='text']:disabled {
+ color: #999;
+}
+.chrome-bootstrap select:hover:enabled,
+.chrome-bootstrap input[type='checkbox']:hover:enabled,
+.chrome-bootstrap input[type='radio']:hover:enabled,
+.chrome-bootstrap button:hover:enabled {
+ background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
+ border-color: rgba(0, 0, 0, 0.3);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95);
+ color: black;
+}
+.chrome-bootstrap select:hover:enabled {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAWklEQVQokWNgoAOIAuI0PDiKaJMSgYCZmfkbkPkfHYPEQfJEG/b//3+FBQsWLGRjY/uJbBCIDxIHyRNtGDYDyTYI3UA+Pr4vFBmEbODbt2+bKDYIyUBWYtQBAIRzRP/XKJ//AAAAAElFTkSuQmCC"), -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
+}
+.chrome-bootstrap select:active:enabled,
+.chrome-bootstrap input[type='checkbox']:active:enabled,
+.chrome-bootstrap input[type='radio']:active:enabled,
+.chrome-bootstrap button:active:enabled {
+ background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
+ box-shadow: none;
+ text-shadow: none;
+}
+.chrome-bootstrap select:active:enabled {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAYAAAAbQcSUAAAAWklEQVQokWNgoAOIAuI0PDiKaJMSgYCZmfkbkPkfHYPEQfJEG/b//3+FBQsWLGRjY/uJbBCIDxIHyRNtGDYDyTYI3UA+Pr4vFBmEbODbt2+bKDYIyUBWYtQBAIRzRP/XKJ//AAAAAElFTkSuQmCC"), -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
+}
+.chrome-bootstrap .overlay {
+ -webkit-box-align: center;
+ -webkit-box-orient: vertical;
+ -webkit-box-pack: center;
+ -webkit-transition: opacity .2s;
+ background-color: rgba(255, 255, 255, 0.75);
+ bottom: 0;
+ display: -webkit-box;
+ left: 0;
+ overflow: auto;
+ padding: 20px;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 5;
+ opacity: 1;
+}
+.chrome-bootstrap .overlay.transparent {
+ opacity: 0;
+}
+.chrome-bootstrap .overlay.transparent .page {
+ -webkit-transform: scale(0.99) translateY(-20px);
+}
+.chrome-bootstrap .overlay .page {
+ -webkit-border-radius: 3px;
+ -webkit-box-orient: vertical;
+ -webkit-transition: 200ms -webkit-transform;
+ background: white;
+ box-shadow: 0 4px 23px 5px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
+ color: #333;
+ display: -webkit-box;
+ min-width: 400px;
+ padding: 0;
+ position: relative;
+ overflow: hidden;
+}
+@-webkit-keyframes pulse {
+ 0% {
+ -webkit-transform: scale(1);
+ }
+ 40% {
+ -webkit-transform: scale(1.02);
+ }
+ 60% {
+ -webkit-transform: scale(1.02);
+ }
+ 100% {
+ -webkit-transform: scale(1);
+ }
+}
+.chrome-bootstrap .overlay .page.pulse {
+ -webkit-animation-duration: 180ms;
+ -webkit-animation-iteration-count: 1;
+ -webkit-animation-name: pulse;
+ -webkit-animation-timing-function: ease-in-out;
+}
+.chrome-bootstrap .overlay .page h1 {
+ -webkit-padding-end: 24px;
+ -webkit-user-select: none;
+ color: #333;
+ font-size: 120%;
+ margin: 0;
+ padding: 14px 17px 14px;
+ text-shadow: white 0 1px 2px;
+}
+.chrome-bootstrap .overlay .page ul li {
+ padding: 5px 0;
+}
+.chrome-bootstrap .overlay .page ul.tags li {
+ padding: 2px 5px;
+}
+.chrome-bootstrap .overlay .page .content-area {
+ -webkit-box-flex: 1;
+ overflow: auto;
+ padding: 6px 17px 6px;
+}
+.chrome-bootstrap .overlay .page .close-button {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAQAAAC1QeVaAAAAUklEQVR4XqXPYQrAIAhAYW/gXd8NJxTopVqsGEhtf+L9/ERU2k/HSMFQpKcYJeNFI9Be0LCMij8cYyjj5EHIivGBkwLfrbX3IF8PqumVmnDpEG+eDsKibPG2JwAAAABJRU5ErkJggg==');
+ background-position: center;
+ background-repeat: no-repeat;
+ height: 14px;
+ position: absolute;
+ right: 7px;
+ top: 7px;
+ width: 14px;
+}
+.chrome-bootstrap .overlay .page .close-button:hover {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAQAAAC1QeVaAAAAnUlEQVR4XoWQQQ6CQAxFewjkJkMCyXgJPMk7AiYczyBeZEAX6AKctGIaN+bt+trk9wtGQc/IkhnoKGxqqiWxOSZalapWFZ6VrIUDExsN0a5JRBq9LoVOR0eEQMoEhKizXhhsn0p1sCWVo7CwOf1RytPL8CPvwuBUoHL6ugeK30CVD1TqK7V/hdpe+VNChhOzV8xWny/+xosHF8578W/Hmc1OOC3wmwAAAABJRU5ErkJggg==');
+}
+.chrome-bootstrap .overlay .page .action-area {
+ -webkit-box-align: center;
+ -webkit-box-orient: horizontal;
+ -webkit-box-pack: end;
+ display: -webkit-box;
+ padding: 14px 17px;
+}
+.chrome-bootstrap .overlay .page .action-area-right {
+ display: -webkit-box;
+}
+.chrome-bootstrap .overlay .page .button-strip {
+ -webkit-box-orient: horizontal;
+ display: -webkit-box;
+}
+.chrome-bootstrap .overlay .page .button-strip button {
+ -webkit-margin-start: 10px;
+ display: block;
+}
diff --git a/options.html b/options.html
index 70b72e6..16da658 100644
--- a/options.html
+++ b/options.html
@@ -3,11 +3,41 @@
Chrome Copy URLs From All Tabs - Options
+
+
-
- TEST
+
+
+
+
+
+ Chrome Copy URLs from All Tabs
+
+
+
+ Favorite color:
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/options.js b/options.js
new file mode 100644
index 0000000..ce07520
--- /dev/null
+++ b/options.js
@@ -0,0 +1,32 @@
+// Saves options to chrome.storage
+function save_options() {
+ var color = document.getElementById('color').value;
+ var likesColor = document.getElementById('like').checked;
+ chrome.storage.sync.set({
+ favoriteColor: color,
+ likesColor: likesColor
+ }, function() {
+ // Update status to let user know options were saved.
+ var status = document.getElementById('status');
+ status.textContent = 'Options saved.';
+ setTimeout(function() {
+ status.textContent = '';
+ }, 750);
+ });
+}
+
+// Restores select box and checkbox state using the preferences
+// stored in chrome.storage.
+function restore_options() {
+ // Use default value color = 'red' and likesColor = true.
+ chrome.storage.sync.get({
+ favoriteColor: 'red',
+ likesColor: true
+ }, function(items) {
+ document.getElementById('color').value = items.favoriteColor;
+ document.getElementById('like').checked = items.likesColor;
+ });
+}
+document.addEventListener('DOMContentLoaded', restore_options);
+document.getElementById('save').addEventListener('click',
+ save_options);
\ No newline at end of file
--
cgit v1.2.3
From 81b1b4348bef86aa15d4ece4737ce4486227b4c8 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 14:31:00 -0400
Subject: options: add form elements from extension
Markup for form elements on options page.
---
options.html | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/options.html b/options.html
index 16da658..47bd92f 100644
--- a/options.html
+++ b/options.html
@@ -7,6 +7,8 @@
@@ -18,21 +20,27 @@
- Favorite color:
-
-
-
-
-
-
+
+ Default button click behaviour:
+
+
+
+
+ File format:
+
+
+
+
--
cgit v1.2.3
From 949c5d450519983939bc9f119e6a9f3c6e82d19b Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 14:47:42 -0400
Subject: options.js: convert spaces to tabs
---
options.js | 45 +++++++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/options.js b/options.js
index ce07520..3d3ac29 100644
--- a/options.js
+++ b/options.js
@@ -1,32 +1,33 @@
// Saves options to chrome.storage
function save_options() {
- var color = document.getElementById('color').value;
- var likesColor = document.getElementById('like').checked;
- chrome.storage.sync.set({
- favoriteColor: color,
- likesColor: likesColor
- }, function() {
- // Update status to let user know options were saved.
- var status = document.getElementById('status');
- status.textContent = 'Options saved.';
- setTimeout(function() {
- status.textContent = '';
- }, 750);
- });
+ var color = document.getElementById('color').value;
+ var likesColor = document.getElementById('like').checked;
+ chrome.storage.sync.set({
+ favoriteColor: color,
+ likesColor: likesColor
+ }, function() {
+ // Update status to let user know options were saved.
+ var status = document.getElementById('status');
+ status.textContent = 'Options saved.';
+ setTimeout(function() {
+ status.textContent = '';
+ }, 750);
+ });
}
// Restores select box and checkbox state using the preferences
// stored in chrome.storage.
function restore_options() {
- // Use default value color = 'red' and likesColor = true.
- chrome.storage.sync.get({
- favoriteColor: 'red',
- likesColor: true
- }, function(items) {
- document.getElementById('color').value = items.favoriteColor;
- document.getElementById('like').checked = items.likesColor;
- });
+ // Use default value color = 'red' and likesColor = true.
+ chrome.storage.sync.get({
+ favoriteColor: 'red',
+ likesColor: true
+ }, function(items) {
+ document.getElementById('color').value = items.favoriteColor;
+ document.getElementById('like').checked = items.likesColor;
+ });
}
+
document.addEventListener('DOMContentLoaded', restore_options);
document.getElementById('save').addEventListener('click',
- save_options);
\ No newline at end of file
+save_options);
\ No newline at end of file
--
cgit v1.2.3
From b1dbb04522561d5877616b3b26d767aa41ab5ba5 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 15:07:38 -0400
Subject: Add 'storage' to permissions in manifest
Turns out I need this to store option values.
---
manifest.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/manifest.json b/manifest.json
index d12f1ba..72f46bf 100644
--- a/manifest.json
+++ b/manifest.json
@@ -17,6 +17,7 @@
},
"permissions": [
- "tabs"
+ "tabs",
+ "storage"
]
}
--
cgit v1.2.3
From 859fc43f1156e2adfbe1580de7a9ba5728818760 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 15:08:47 -0400
Subject: Store options & load values from storage
---
options.js | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/options.js b/options.js
index 3d3ac29..23bb4c5 100644
--- a/options.js
+++ b/options.js
@@ -1,10 +1,10 @@
// Saves options to chrome.storage
function save_options() {
- var color = document.getElementById('color').value;
- var likesColor = document.getElementById('like').checked;
+ var button_click_behaviour = document.getElementById('button-click-behaviour').value;
+ var file_format = document.getElementById('file-format').value;
chrome.storage.sync.set({
- favoriteColor: color,
- likesColor: likesColor
+ button_click_behaviour: button_click_behaviour,
+ file_format: file_format
}, function() {
// Update status to let user know options were saved.
var status = document.getElementById('status');
@@ -20,11 +20,11 @@ function save_options() {
function restore_options() {
// Use default value color = 'red' and likesColor = true.
chrome.storage.sync.get({
- favoriteColor: 'red',
- likesColor: true
+ button_click_behaviour: 'window',
+ file_format: 'text'
}, function(items) {
- document.getElementById('color').value = items.favoriteColor;
- document.getElementById('like').checked = items.likesColor;
+ document.getElementById('button-click-behaviour').value = items.button_click_behaviour;
+ document.getElementById('file-format').value = items.file_format;
});
}
--
cgit v1.2.3
From dae3bcc4249c0c98f19df2a3cab671773942f887 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 15:10:19 -0400
Subject: Options: update status text on save
Move to the right side of the save button and show it for a longer
amount of time.
---
options.html | 2 +-
options.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/options.html b/options.html
index 47bd92f..8cbf895 100644
--- a/options.html
+++ b/options.html
@@ -38,8 +38,8 @@
diff --git a/options.js b/options.js
index 23bb4c5..b1d1192 100644
--- a/options.js
+++ b/options.js
@@ -11,7 +11,7 @@ function save_options() {
status.textContent = 'Options saved.';
setTimeout(function() {
status.textContent = '';
- }, 750);
+ }, 1000);
});
}
--
cgit v1.2.3
From 9195a855b9f4a02440b70fe83addd37ff60b41ad Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 15:22:43 -0400
Subject: Page: update 'text' format output
* Remove tags
* Show page title and URL for each entry
---
chrome-get-urls-from-tabs-in-windows.js | 41 ++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 14 deletions(-)
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index a689b0c..0717a01 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -2,26 +2,39 @@ var textarea = document.getElementById('copy-area');
var create_download_link;
var generate_filename;
-chrome.windows.getAll({populate:true},function(windows){
+
+chrome.windows.getAll({populate:true}, function(windows){
var w_index = 0;
- windows.forEach(function(window){
- textarea.value += "Window " + w_index + ":";
+ chrome.storage.sync.get(function(items) {
+ var format = items.file_format;
+ console.log(format);
+
+ if (format === 'yaml') {
+
+ }
+ else if (format === 'html') {
+
+ }
+ else { // format === 'text'
+ windows.forEach(function(window){
+ textarea.value += "Window " + w_index + ":";
+
+ window.tabs.forEach(function(tab){
+ textarea.value += "\n";
+ textarea.value += "\t* " + tab.title + "\n";
+ textarea.value += "\t " + tab.url + "\n";
+ });
- window.tabs.forEach(function(tab){
- //collect all of the urls here, I will just log them instead
- //console.log(tab.url);
- textarea.value += "\n\t";
- textarea.value += '* ' + tab.url + "\n";
- textarea.value += "\t\t" + '' + tab.title + '';
- });
+ textarea.value += "\n\n";
- textarea.value += "\n\n";
+ w_index++;
+ });
+ }
- w_index++;
+
+ create_download_link(textarea.value);
});
-
- create_download_link(textarea.value);
});
--
cgit v1.2.3
From b8aa3166e3ff74c93a97b02c204924f85b69d6be Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sun, 30 Mar 2014 16:10:01 -0400
Subject: Add YAML output
---
chrome-get-urls-from-tabs-in-windows.html | 1 +
chrome-get-urls-from-tabs-in-windows.js | 46 +++++++++++++++++++++++++++++--
yaml.min.js | 22 +++++++++++++++
3 files changed, 67 insertions(+), 2 deletions(-)
create mode 100644 yaml.min.js
diff --git a/chrome-get-urls-from-tabs-in-windows.html b/chrome-get-urls-from-tabs-in-windows.html
index a45f70a..1fd3141 100644
--- a/chrome-get-urls-from-tabs-in-windows.html
+++ b/chrome-get-urls-from-tabs-in-windows.html
@@ -14,6 +14,7 @@
+
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index 0717a01..eb2f3c1 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -8,13 +8,55 @@ chrome.windows.getAll({populate:true}, function(windows){
chrome.storage.sync.get(function(items) {
var format = items.file_format;
- console.log(format);
if (format === 'yaml') {
+ var chrome_tabs = [];
+ windows.forEach(function(window){
+ // var window_name = 'Window ' + w_index;
+ //
+ // window.tabs.forEach(function(tab){
+ // var window_output = {};
+ // window_output[window_name] = [
+ // {
+ // page_title: tab.title,
+ // url: tab.url
+ // }
+ // ];
+ //
+ // chrome_tabs.push(window_output);
+ // });
+
+ textarea.value += "- Window " + w_index + ":\n";
+
+ window.tabs.forEach(function(tab){
+ textarea.value += " - page_title: '" + tab.title.replace('\'', '\'\'') + "'\n";
+ textarea.value += " url: '" + tab.url + "'\n";
+ });
+
+ textarea.value += "\n";
+
+ // console.log(chrome_tabs);
+ // console.log(YAML.stringify(chrome_tabs));
+ //textarea.value = YAML.stringify(chrome_tabs);
+
+ w_index++;
+ });
}
else if (format === 'html') {
-
+ windows.forEach(function(window){
+ textarea.value += "Window " + w_index + ":";
+
+ window.tabs.forEach(function(tab){
+ textarea.value += "\n";
+ textarea.value += "\t* " + tab.title + "\n";
+ textarea.value += "\t " + tab.url + "\n";
+ });
+
+ textarea.value += "\n\n";
+
+ w_index++;
+ });
}
else { // format === 'text'
windows.forEach(function(window){
diff --git a/yaml.min.js b/yaml.min.js
new file mode 100644
index 0000000..24ce445
--- /dev/null
+++ b/yaml.min.js
@@ -0,0 +1,22 @@
+/*
+Copyright (c) 2010 Jeremy Faivre
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+(function(){var e=function(e,t,n,r){this.rawMessage=e,this.parsedLine=t!==undefined?t:-1,this.snippet=n!==undefined?n:null,this.parsedFile=r!==undefined?r:null,this.updateRepr(),this.message=e};e.prototype={name:"YamlParseException",message:null,parsedFile:null,parsedLine:-1,snippet:null,rawMessage:null,isDefined:function(e){return e!=undefined&&e!=null},getSnippet:function(){return this.snippet},setSnippet:function(e){this.snippet=e,this.updateRepr()},getParsedFile:function(){return this.parsedFile},setParsedFile:function(e){this.parsedFile=e,this.updateRepr()},getParsedLine:function(){return this.parsedLine},setParsedLine:function(e){this.parsedLine=e,this.updateRepr()},updateRepr:function(){this.message=this.rawMessage;var e=!1;"."===this.message.charAt(this.message.length-1)&&(this.message=this.message.substring(0,this.message.length-1),e=!0),null!==this.parsedFile&&(this.message+=" in "+JSON.stringify(this.parsedFile)),this.parsedLine>=0&&(this.message+=" at line "+this.parsedLine),this.snippet&&(this.message+=' (near "'+this.snippet+'")'),e&&(this.message+=".")}};var t=!1,n=function(){};n.prototype={parseFile:function(t,r){if(r==null){var i=this.getFileContents(t),s=null;try{s=this.parse(i)}catch(o){throw o instanceof e&&o.setParsedFile(t),o}return s}this.getFileContents(t,function(e){r((new n).parse(e))})},parse:function(e){var t=new s;return t.parse(e)},dump:function(e,t,n){t==null&&(t=2);var r=new u;return n&&(r.numSpacesForIndentation=n),r.dump(e,t)},getXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject){var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var t=0;t<4;t++)try{return new ActiveXObject(e[t])}catch(n){}}return null},getFileContents:function(e,n){if(t){var r=require("fs");if(n==null){var i=r.readFileSync(e);return i==null?null:""+i}r.readFile(e,function(e,t){e?n(null):n(t)})}else{var s=this.getXHR();if(n==null)return s.open("GET",e,!1),s.send(null),s.status==200||s.status==0?s.responseText:null;s.onreadystatechange=function(){s.readyState==4&&(s.status==200||s.status==0?n(s.responseText):n(null))},s.open("GET",e,!0),s.send(null)}}};var r={stringify:function(e,t,r){return(new n).dump(e,t,r)},parse:function(e){return(new n).parse(e)},load:function(e,t){return(new n).parseFile(e,t)}};typeof exports!="undefined"&&typeof module!="undefined"&&module.exports&&(exports=module.exports=r,t=!0,function(){var e=function(e,t){e.exports=r.load(t)};undefined!==require.extensions&&(require.extensions[".yml"]=e,require.extensions[".yaml"]=e)}()),typeof window!="undefined"&&(window.YAML=r);var i=function(){};i.prototype={i:null,parse:function(t){var n=null;t=this.trim(t);if(0==t.length)return"";switch(t.charAt(0)){case"[":n=this.parseSequence(t);break;case"{":n=this.parseMapping(t);break;default:n=this.parseScalar(t)}if(t.substr(this.i+1).replace(/^\s*#.*$/,"")!="")throw console.log("oups "+t.substr(this.i+1)),new e('Unexpected characters near "'+t.substr(this.i)+'".');return n},dump:function(e){if(undefined==e||null==e)return"null";if(e instanceof Date)return e.toISOString();if(typeof e=="object")return this.dumpObject(e);if(typeof e=="boolean")return e?"true":"false";if(/^\d+$/.test(e))return typeof e=="string"?"'"+e+"'":parseInt(e);if(this.isNumeric(e))return typeof e=="string"?"'"+e+"'":parseFloat(e);if(typeof e=="number")return e==Infinity?".Inf":e==-Infinity?"-.Inf":isNaN(e)?".NAN":e;var t=new YamlEscaper;return t.requiresDoubleQuoting(e)?t.escapeWithDoubleQuotes(e):t.requiresSingleQuoting(e)?t.escapeWithSingleQuotes(e):""==e?"":this.getTimestampRegex().test(e)?"'"+e+"'":this.inArray(e.toLowerCase(),["null","~","true","false"])?"'"+e+"'":e},dumpObject:function(e){var t=this.getKeys(e),n=null,r,i=t.length;if(e instanceof Array){n=[];for(r=0;r0&&e.replace(/\s+/g,"")!=""},inArray:function(e,t){var n,r=t.length;for(n=0;n0?e[0]==="last"&&(s-=7):e[0]==="next"&&(s+=7),t.setDate(t.getDate()+s),t.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;r*=parseInt(e[0],10);switch(e[1].substring(0,3)){case"yea":t.setFullYear(t.getFullYear()+r);break;case"mon":t.setMonth(t.getMonth()+r);break;case"wee":t.setDate(t.getDate()+r*7);break;case"day":t.setDate(t.getDate()+r);break;case"hou":t.setHours(t.getHours()+r);break;case"min":t.setMinutes(t.getMinutes()+r);break;case"sec":t.setSeconds(t.getSeconds()+r)}}return!0};i=e.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(i!==null)return i[2]?i[3]||(i[2]+=":00"):i[2]="00:00:00",s=i[1].split(/-/g),s[1]=u.mon[s[1]-1]||s[1],s[0]=+s[0],s[0]=s[0]>=0&&s[0]<=69?"20"+(s[0]<10?"0"+s[0]:s[0]+""):s[0]>=70&&s[0]<=99?"19"+s[0]:s[0]+"",parseInt(this.strtotime(s[2]+" "+s[1]+" "+s[0]+" "+i[2])+(i[4]?i[4]:""),10);var f="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";i=e.match(new RegExp(f,"gi"));if(i===null)return!1;for(n=0,r=i.length;n=n)){if(0==r){this.moveToPreviousLine();break}throw new e("Indentation problem B",this.getRealCurrentLineNb()+1,this.currentLine)}s.push(this.currentLine.substr(n))}}return s.join("\n")},moveToNextLine:function(){return this.currentLineNb>=this.lines.length-1?!1:(this.currentLineNb++,this.currentLine=this.lines[this.currentLineNb],!0)},moveToPreviousLine:function(){this.currentLineNb--,this.currentLine=this.lines[this.currentLineNb]},parseValue:function(t){if("*"==(t+"").charAt(0)){this.trim(t).charAt(0)=="#"?t=(t+"").substr(1,t.indexOf("#")-2):t=(t+"").substr(1);if(this.refs[t]==undefined)throw new e('Reference "'+t+'" does not exist',this.getRealCurrentLineNb()+1,this.currentLine);return this.refs[t]}var n=null;if(n=/^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(t)){n={separator:n[1],modifiers:n[2],comments:n[3]};var r=this.isDefined(n.modifiers)?n.modifiers:"";return this.parseFoldedScalar(n.separator,r.replace(/\d+/g,""),Math.abs(parseInt(r)))}try{return(new i).parse(t)}catch(s){throw s instanceof e&&(s.setParsedLine(this.getRealCurrentLineNb()+1),s.setSnippet(this.currentLine)),s}},parseFoldedScalar:function(e,t,n){t==undefined&&(t=""),n==undefined&&(n=0),e="|"==e?"\n":" ";var r="",i=null,s=this.moveToNextLine();while(s&&this.isCurrentLineBlank())r+="\n",s=this.moveToNextLine();if(!s)return"";var o=null;if(!(o=(new RegExp("^("+(n?this.strRepeat(" ",n):" +")+")(.*)$")).exec(this.currentLine)))return this.moveToPreviousLine(),"";o={indent:o[1],text:o[2]};var u=o.indent,a=0;r+=o.text+e;while(this.currentLineNb+1=0;r--)t.push(e[r]);return t},merge:function(e,t){var n={},r;for(r in e)e.hasOwnProperty(r)&&(/^\d+$/.test(r)?n.push(e):n[r]=e[r]);for(r in t)t.hasOwnProperty(r)&&(/^\d+$/.test(r)?n.push(t):n[r]=t[r]);return n},strRepeat:function(e,t){var n,r="";for(n=0;n=n&&r.push("");var s="";return s=e.replace(new RegExp(YamlEscaper.escapees.join("|"),"g"),function(e){for(var n=0;n=!%@`]/.test(e)},escapeWithSingleQuotes:function(e){return"'"+e.replace(/'/g,"''")+"'"}},YamlEscaper.REGEX_CHARACTER_TO_ESCAPE="[\\x00-\\x1f]|Â
| |â¨|â©",YamlEscaper.escapees=["\\\\",'\\"','"',"\0","","","","","","","","\b"," ","\n","","\f","\r","","","","","","","","","","","","","","","","","","","Â
"," ","â¨","â©"],YamlEscaper.escaped=['\\"',"\\\\",'\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];var o=function(){};o.prototype={unescapeSingleQuotedString:function(e){return e.replace(/''/g,"'")},unescapeDoubleQuotedString:function(e){var t=function(e){return(new o).unescapeCharacter(e)};return e.replace(new RegExp(o.REGEX_ESCAPED_CHARACTER,"g"),t)},unescapeCharacter:function(e){switch(e.charAt(1)){case"0":return String.fromCharCode(0);case"a":return String.fromCharCode(7);case"b":return String.fromCharCode(8);case"t":return" ";case" ":return" ";case"n":return"\n";case"v":return String.fromCharCode(11);case"f":return String.fromCharCode(12);case"r":return String.fromCharCode(13);case"e":return"";case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return"\0
";case"_":return"\0 ";case"L":return" (";case"P":return" )";case"x":return this.pack("n",(new i).hexdec(e.substr(2,2)));case"u":return this.pack("n",(new i).hexdec(e.substr(2,4)));case"U":return this.pack("N",(new i).hexdec(e.substr(2,8)))}},pack:function(e){var t=0,n=1,r="",i="",s=0,o=[],u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A;while(targuments.length-n)throw new Error("Warning: pack() Type "+u+": too few arguments");for(s=0;s>8&255),r+=String.fromCharCode(arguments[n]&255),n++;break;case"N":a==="*"&&(a=arguments.length-n);if(a>arguments.length-n)throw new Error("Warning: pack() Type "+u+": too few arguments");for(s=0;s>24&255),r+=String.fromCharCode(arguments[n]>>16&255),r+=String.fromCharCode(arguments[n]>>8&255),r+=String.fromCharCode(arguments[n]&255),n++;break;default:throw new Error("Warning: pack() Type "+u+": unknown format code")}}if(nt)return[];var n=[];for(var r=e;r<=t;r++)n.push(r);return n},arrayEquals:function(e,t){if(e.length!=t.length)return!1;var n=e.length;for(var r=0;r
-