├── old
├── builds
│ ├── packed
│ │ ├── chrome.zip
│ │ ├── firefox.xpi
│ │ ├── icon.png
│ │ └── icon64.png
│ └── unpacked
│ │ └── chrome
│ │ ├── data
│ │ ├── content_script
│ │ │ ├── inject.css
│ │ │ └── inject.js
│ │ └── icons
│ │ │ ├── 128.png
│ │ │ ├── 16.png
│ │ │ ├── 24.png
│ │ │ ├── 256.png
│ │ │ ├── 32.png
│ │ │ ├── 48.png
│ │ │ └── 64.png
│ │ ├── lib
│ │ ├── chrome
│ │ │ ├── background.html
│ │ │ ├── chrome.js
│ │ │ └── toBlob.js
│ │ ├── common.js
│ │ └── config.js
│ │ └── manifest.json
├── drawings
│ ├── Screen Shot 2015-04-08 at 15.27.30.png
│ ├── chrome-screenshot.png
│ ├── large-tile.png
│ ├── large-tile.xcf
│ ├── marquee.png
│ ├── marquee.xcf
│ ├── promo.png
│ ├── promo.xcf
│ ├── screenshot.png
│ ├── screenshot.xcf
│ ├── small-tile.png
│ └── small-tile.xcf
├── gulpfile.js
└── src
│ ├── Icon-64.png
│ ├── Info.plist
│ ├── data
│ ├── content_script
│ │ ├── inject.css
│ │ └── inject.js
│ ├── firefox
│ │ └── chrome.js
│ └── icons
│ │ ├── 128.png
│ │ ├── 16.png
│ │ ├── 24.png
│ │ ├── 256.png
│ │ ├── 32.png
│ │ ├── 48.png
│ │ └── 64.png
│ ├── lib
│ ├── chrome
│ │ ├── background.html
│ │ ├── chrome.js
│ │ └── toBlob.js
│ ├── common.js
│ ├── config.js
│ ├── firefox
│ │ ├── firefox.js
│ │ └── mm.js
│ └── safari
│ │ ├── background.html
│ │ ├── q.js
│ │ ├── safari.html
│ │ ├── safari.js
│ │ └── toBlob.js
│ ├── manifest.json
│ ├── package.json
│ └── update.plist
├── v2
├── background.js
├── data
│ ├── icons
│ │ ├── 128.png
│ │ ├── 16.png
│ │ ├── 24.png
│ │ ├── 256.png
│ │ ├── 32.png
│ │ ├── 48.png
│ │ └── 64.png
│ └── inject
│ │ ├── inject.css
│ │ ├── inject.js
│ │ ├── notify.css
│ │ └── notify.js
└── manifest.json
└── v3
├── _locales
├── bg
│ └── messages.json
├── de
│ └── messages.json
├── el
│ └── messages.json
├── en
│ └── messages.json
├── es
│ └── messages.json
├── fr
│ └── messages.json
├── it
│ └── messages.json
├── ja
│ └── messages.json
├── nl
│ └── messages.json
├── pt_BR
│ └── messages.json
├── ru
│ └── messages.json
└── zh_CN
│ └── messages.json
├── data
├── icons
│ ├── 128.png
│ ├── 16.png
│ ├── 24.png
│ ├── 256.png
│ ├── 32.png
│ ├── 48.png
│ └── 64.png
└── inject
│ ├── inject.css
│ ├── inject.js
│ ├── notify.css
│ └── notify.js
├── manifest.json
└── worker.js
/old/builds/packed/chrome.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/packed/chrome.zip
--------------------------------------------------------------------------------
/old/builds/packed/firefox.xpi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/packed/firefox.xpi
--------------------------------------------------------------------------------
/old/builds/packed/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/packed/icon.png
--------------------------------------------------------------------------------
/old/builds/packed/icon64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/packed/icon64.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/content_script/inject.css:
--------------------------------------------------------------------------------
1 | .itrisearch-box {
2 | box-sizing: border-box;
3 | position: fixed;
4 | z-index: 2147483646;
5 | border: gray 1px dotted;
6 | box-shadow: 0 0 0 50000px rgba(0, 0, 0, 0.2);
7 | }
8 | .itrisearch-box:before {
9 | content: '';
10 | display: block;
11 | width: calc(100% + 20px);
12 | height: calc(100% + 20px);
13 | margin-left: -10px;
14 | margin-top: -10px;
15 | cursor: crosshair;
16 | }
17 |
18 | .itrisearch-guide-1,
19 | .itrisearch-guide-2 {
20 | box-sizing: border-box;
21 | position: fixed;
22 | z-index: 2147483646;
23 | }
24 | .itrisearch-guide-1 {
25 | border-right: dashed 1px gray;
26 | top: 0;
27 | left: 0;
28 | height: 100%;
29 | }
30 | .itrisearch-guide-2 {
31 | border-bottom: dashed 1px gray;
32 | top: 0;
33 | width: 100%;
34 | }
35 | .itrisearch-guide-3 {
36 | z-index: 2147483645;
37 | position: fixed;
38 | top: 0;
39 | left: 0;
40 | width: 100%;
41 | height: 100%;
42 | }
43 |
44 | .itrisearch-notification {
45 | position: fixed;
46 | z-index: 2147483646;
47 | right: 20px;
48 | bottom: 20px;
49 | width: 250px;
50 | height: 40px;
51 | line-height: 40px;
52 | background-color: #FFF;
53 | border: solid 2px gray;
54 | padding: 0 5px;
55 | box-shadow: 1px 1px 5px #aaa;
56 | color: #222;
57 | font-family: arial,sans-serif !important;
58 | font-size: 12px !important;
59 | }
60 | .itrisearch-notification button {
61 | position: absolute;
62 | top: 2px;
63 | right: 2px;
64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAMAAADXEh96AAAAilBMVEVEREBEREBEREBEREBEREBEREBEREAlJSMSEhE3NzQAAAAAAAAQEA8BAQEAAAAAAAAAAAAAAAAvLywBAQEAAAAAAAAcHBoAAAAAAAAAAAAAAAAAAAAyMi8AAAAAAAABAQELCwo4ODUAAAAAAAAWFhUsLCkKCgkDAwIAAAAAAAAtLSoCAgIHBwcAAACgX5xYAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAXEYAAFxGARSUQ0EAAAAHdElNRQffBAgGGDS4qporAAAAG0lEQVQI12NgZGRgAGJGMGBggJAMCA5YDsQEAAJ2AB0Q4n77AAAAAElFTkSuQmCC) center center no-repeat;
65 | width: 12px;
66 | height: 12px;
67 | margin: 0;
68 | padding: 0;
69 | border: 0;
70 | cursor: pointer;
71 | opacity: 0.5;
72 | }
73 | .itrisearch-notification button:hover {
74 | opacity: 1.0;
75 | }
76 |
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/content_script/inject.js:
--------------------------------------------------------------------------------
1 | /* global self, safari*/
2 | 'use strict';
3 |
4 | var background = {}, manifest = {};
5 | /**** wrapper (start) ****/
6 | if (typeof self !== 'undefined' && self.port) { //Firefox
7 | background.send = function (id, data) {
8 | self.port.emit(id, data);
9 | };
10 | background.receive = function (id, callback) {
11 | self.port.on(id, callback);
12 | };
13 | manifest.url = self.options.base;
14 | self.port.on('detach', function () {
15 | try {
16 | capture.remove();
17 | guide.remove();
18 | notification.remove();
19 | }
20 | catch (e) {}
21 | });
22 | }
23 | else if (typeof safari !== 'undefined') { // Safari
24 | background.send = function (id, obj) {
25 | safari.self.tab.dispatchMessage('message', {
26 | id: id,
27 | data: obj
28 | });
29 | };
30 | background.receive = (function () {
31 | var callbacks = {};
32 | safari.self.addEventListener('message', function (e) {
33 | if (callbacks[e.name]) {
34 | callbacks[e.name](e.message);
35 | }
36 | }, false);
37 |
38 | return function (id, callback) {
39 | callbacks[id] = callback;
40 | };
41 | })();
42 | manifest.url = safari.extension.baseURI;
43 |
44 | document.addEventListener('contextmenu', function (e) {
45 | safari.self.tab.setContextMenuEventUserInfo(event, {
46 | nodeName: e.target.nodeName,
47 | src: e.target.src
48 | });
49 | }, false);
50 | }
51 | else { // Chrome
52 | background.send = function (id, data) {
53 | chrome.runtime.sendMessage({method: id, data: data});
54 | };
55 | background.receive = function (id, callback) {
56 | chrome.runtime.onMessage.addListener(function (request) {
57 | if (request.method === id) {
58 | callback(request.data);
59 | }
60 | });
61 | };
62 | manifest.url = chrome.extension.getURL('./');
63 | }
64 | /**** wrapper (end) ****/
65 |
66 | var capture = (function () {
67 | var box, _left, _top, left, top, width, height;
68 |
69 | function update (e) {
70 | left = (e.clientX > _left ? _left : e.clientX - 1);
71 | top = (e.clientY > _top ? _top : e.clientY - 1);
72 | width = Math.abs(e.clientX - _left);
73 | height = Math.abs(e.clientY - _top);
74 | box.style.left = left + 'px';
75 | box.style.top = top + 'px';
76 | box.style.width = width + 'px';
77 | box.style.height = height + 'px';
78 | }
79 | function remove () {
80 | background.send('capture', {
81 | left: left + 1,
82 | top: top + 1,
83 | width: width - 2,
84 | height: height - 2,
85 | devicePixelRatio: window.devicePixelRatio
86 | });
87 | guide.remove();
88 | capture.remove();
89 | monitor.remove();
90 | }
91 | function mousedown(e) {
92 | // prevent content selection on Firefox
93 | e.stopPropagation();
94 | e.preventDefault();
95 | box = document.createElement('div');
96 | box.setAttribute('class', 'itrisearch-box');
97 |
98 | _left = e.clientX;
99 | _top = e.clientY;
100 |
101 | document.addEventListener('mousemove', update, false);
102 | document.addEventListener('mouseup', remove, false);
103 | document.body.appendChild(box);
104 | }
105 |
106 | return {
107 | install: function () {
108 | document.addEventListener('mousedown', mousedown, false);
109 | },
110 | remove: function () {
111 | document.removeEventListener('mousedown', mousedown, false);
112 | document.removeEventListener('mousemove', update, false);
113 | document.removeEventListener('mouseup', remove, false);
114 | if (box && box.parentNode) {
115 | box.parentNode.removeChild(box);
116 | }
117 | }
118 | };
119 | })();
120 |
121 | var guide = (function () {
122 | var guide1, guide2, guide3;
123 | function position (left, top) {
124 | guide1.style.width = left + 'px';
125 | guide2.style.height = top + 'px';
126 | }
127 | function update (e) {
128 | position(e.clientX, e.clientY);
129 | }
130 | return {
131 | install: function () {
132 | guide1 = document.createElement('div');
133 | guide2 = document.createElement('div');
134 | guide3 = document.createElement('div');
135 | guide1.setAttribute('class', 'itrisearch-guide-1');
136 | guide2.setAttribute('class', 'itrisearch-guide-2');
137 | guide3.setAttribute('class', 'itrisearch-guide-3');
138 | document.body.appendChild(guide3);
139 | document.body.appendChild(guide1);
140 | document.body.appendChild(guide2);
141 | document.addEventListener('mousemove', update, false);
142 | },
143 | remove: function () {
144 | document.removeEventListener('mousemove', update, false);
145 | if (guide1 && guide1.parentNode) {
146 | guide1.parentNode.removeChild(guide1);
147 | }
148 | if (guide2 && guide2.parentNode) {
149 | guide2.parentNode.removeChild(guide2);
150 | }
151 | if (guide3 && guide3.parentNode) {
152 | guide3.parentNode.removeChild(guide3);
153 | }
154 | capture.remove();
155 | }
156 | };
157 | })();
158 |
159 | var monitor = (function () {
160 | function keydown (e) {
161 | if (e.keyCode === 27) {
162 | guide.remove();
163 | capture.remove();
164 | monitor.remove();
165 | }
166 | }
167 | return {
168 | install: function () {
169 | window.addEventListener('keydown', keydown, false);
170 | },
171 | remove: function () {
172 | window.removeEventListener('keydown', keydown, false);
173 | }
174 | };
175 | })();
176 |
177 | var notification = (function () {
178 | var box;
179 | return {
180 | install: function () {
181 | box = document.createElement('div');
182 | box.setAttribute('class', 'itrisearch-notification');
183 | var span = document.createElement('span');
184 | var button = document.createElement('button');
185 | button.setAttribute('type', 'close');
186 | button.addEventListener('click', function () {
187 | notification.hide();
188 | });
189 | box.appendChild(span);
190 | box.appendChild(button);
191 | document.body.appendChild(box);
192 | },
193 | display: function (msg) {
194 | if (!box) {
195 | this.install();
196 | }
197 | box.style.display = 'block';
198 | box.querySelector('span').textContent = msg;
199 | },
200 | hide: function () {
201 | box.style.display = 'none';
202 | },
203 | remove: function () {
204 | if (box && box.parentNode) {
205 | box.parentNode.removeChild(box);
206 | }
207 | }
208 | };
209 | })();
210 |
211 | background.receive('notify', function (msg) {
212 | if (msg) {
213 | notification.display(msg);
214 | }
215 | else {
216 | notification.hide();
217 | }
218 | });
219 |
220 | background.receive('capture', function () {
221 | guide.install();
222 | capture.install();
223 | monitor.install();
224 | });
225 |
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/128.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/16.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/24.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/256.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/32.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/48.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/data/icons/64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/builds/unpacked/chrome/data/icons/64.png
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/lib/chrome/background.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/lib/chrome/chrome.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var app = {};
4 |
5 | if (!Promise.defer) {
6 | Promise.defer = function () {
7 | var deferred = {};
8 | var promise = new Promise(function (resolve, reject) {
9 | deferred.resolve = resolve;
10 | deferred.reject = reject;
11 | });
12 | deferred.promise = promise;
13 | return deferred;
14 | };
15 | }
16 | app.Promise = Promise;
17 |
18 | app.storage = {
19 | read: function (id) {
20 | return localStorage[id] || null;
21 | },
22 | write: function (id, data) {
23 | localStorage[id] = data + '';
24 | }
25 | };
26 |
27 | app.inject = {
28 | send: function (id, data, global) {
29 | if (global) {
30 | chrome.tabs.query({}, function (tabs) {
31 | tabs.forEach(function (tab) {
32 | chrome.tabs.sendMessage(tab.id, {method: id, data: data}, function () {});
33 | });
34 | });
35 | }
36 | else if ('id' in this && 'windowId' in this) {
37 | chrome.tabs.sendMessage(this.id, {method: id, data: data}, function () {});
38 | }
39 | else {
40 | chrome.tabs.query({active: true, currentWindow: true}, function (tabs) {
41 | tabs.forEach(function (tab) {
42 | chrome.tabs.sendMessage(tab.id, {method: id, data: data}, function () {});
43 | });
44 | });
45 | }
46 | },
47 | receive: function (id, callback) {
48 | chrome.runtime.onMessage.addListener(function (message, sender) {
49 | if (message.method === id && sender.tab && sender.tab.url.indexOf('http') === 0) {
50 | callback.call(sender.tab, message.data);
51 | }
52 | });
53 | }
54 | };
55 |
56 | app.tab = {
57 | open: function (url) {
58 | chrome.tabs.create({
59 | url: url
60 | });
61 | }
62 | };
63 |
64 | app.context_menu = {
65 | create: function (title, img, type, callback) {
66 | chrome.contextMenus.create({
67 | 'type': 'normal',
68 | 'title': title,
69 | 'contexts': [type === 'img' ? 'image' : 'page'],
70 | 'onclick': function (info) {
71 | callback(info.srcUrl);
72 | }
73 | });
74 | }
75 | };
76 |
77 | app.version = function () {
78 | return chrome[chrome.runtime && chrome.runtime.getManifest ? 'runtime' : 'extension'].getManifest().version;
79 | };
80 |
81 | app.timer = window;
82 |
83 | app.screenshot = function (left, top, width, height, devicePixelRatio) {
84 | var d = Promise.defer();
85 | left = left * devicePixelRatio;
86 | top = top * devicePixelRatio;
87 | width = width * devicePixelRatio;
88 | height = height * devicePixelRatio;
89 |
90 | chrome.tabs.query({
91 | active: true,
92 | currentWindow: true
93 | }, function (tab) {
94 | chrome.tabs.captureVisibleTab(tab.windowId, {format: 'png'}, function (dataUrl) {
95 | var canvas = document.createElement('canvas');
96 | var ctx = canvas.getContext('2d');
97 | var img = new Image();
98 | img.onload = function () {
99 | canvas.width = width || img.width;
100 | canvas.height = height || img.height;
101 | if (width && height) {
102 | ctx.drawImage(img, left, top, width, height, 0, 0, width, height);
103 | }
104 | else {
105 | ctx.drawImage(img, 0, 0);
106 | }
107 | canvas.toBlob(function (blob) {
108 | d.resolve(blob);
109 | });
110 | };
111 | img.src = dataUrl;
112 | });
113 | });
114 | return d.promise;
115 | };
116 |
117 | app.FormData = window.FormData;
118 | app.XMLHttpRequest = window.XMLHttpRequest;
119 |
--------------------------------------------------------------------------------
/old/builds/unpacked/chrome/lib/chrome/toBlob.js:
--------------------------------------------------------------------------------
1 | if (!HTMLCanvasElement.prototype.toBlob) {
2 | Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
3 | value: function (callback, type, quality) {
4 |
5 | var binStr = atob( this.toDataURL(type, quality).split(',')[1] ),
6 | len = binStr.length,
7 | arr = new Uint8Array(len);
8 |
9 | for (var i=0; i"
12 | ],
13 | "web_accessible_resources": [],
14 | "background": {
15 | "page": "lib/chrome/background.html"
16 | },
17 | "content_scripts": [
18 | {
19 | "matches": [""],
20 | "css": ["data/content_script/inject.css"],
21 | "js": ["data/content_script/inject.js"],
22 | "run_at": "document_start",
23 | "all_frames": false
24 | }
25 | ],
26 | "homepage_url": "http://mybrowseraddon.com/tineye.html",
27 | "icons": {
28 | "16": "data/icons/16.png",
29 | "48": "data/icons/48.png",
30 | "128": "data/icons/128.png"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/old/drawings/Screen Shot 2015-04-08 at 15.27.30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/Screen Shot 2015-04-08 at 15.27.30.png
--------------------------------------------------------------------------------
/old/drawings/chrome-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/chrome-screenshot.png
--------------------------------------------------------------------------------
/old/drawings/large-tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/large-tile.png
--------------------------------------------------------------------------------
/old/drawings/large-tile.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/large-tile.xcf
--------------------------------------------------------------------------------
/old/drawings/marquee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/marquee.png
--------------------------------------------------------------------------------
/old/drawings/marquee.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/marquee.xcf
--------------------------------------------------------------------------------
/old/drawings/promo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/promo.png
--------------------------------------------------------------------------------
/old/drawings/promo.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/promo.xcf
--------------------------------------------------------------------------------
/old/drawings/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/screenshot.png
--------------------------------------------------------------------------------
/old/drawings/screenshot.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/screenshot.xcf
--------------------------------------------------------------------------------
/old/drawings/small-tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/small-tile.png
--------------------------------------------------------------------------------
/old/drawings/small-tile.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/drawings/small-tile.xcf
--------------------------------------------------------------------------------
/old/gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var gulp = require('gulp');
4 | var change = require('gulp-change');
5 | var babel = require('gulp-babel');
6 | var gulpif = require('gulp-if');
7 | var gulpFilter = require('gulp-filter');
8 | var shell = require('gulp-shell');
9 | var wait = require('gulp-wait');
10 | var clean = require('gulp-clean');
11 | var zip = require('gulp-zip');
12 | var rename = require('gulp-rename');
13 | var util = require('gulp-util');
14 | var runSequence = require('run-sequence');
15 |
16 | /* clean */
17 | gulp.task('clean', function () {
18 | return gulp.src([
19 | 'builds/unpacked/chrome/*',
20 | 'builds/unpacked/firefox/*',
21 | ], {read: false})
22 | .pipe(clean());
23 | });
24 | /* chrome build */
25 | gulp.task('chrome-build', function () {
26 | gulp.src([
27 | 'src/**/*'
28 | ])
29 | .pipe(gulpFilter(function (f) {
30 | if (f.relative.indexOf('.DS_Store') !== -1 || f.relative.indexOf('Thumbs.db') !== -1) {
31 | return false;
32 | }
33 | if (f.relative.indexOf('firefox') !== -1 && f.relative.indexOf('firefox.png') === -1) {
34 | return false;
35 | }
36 | if (f.path.indexOf('/locale') !== -1) {
37 | return false;
38 | }
39 | if (f.relative.indexOf('safari') !== -1) {
40 | return false;
41 | }
42 | if (f.relative.split('/').length === 1) {
43 | return f.relative === 'manifest.json' ? true : false;
44 | }
45 | return true;
46 | }))
47 | .pipe(gulpif(function (f) {
48 | return f.path.indexOf('.js') !== -1 && f.path.indexOf('.json') === -1;
49 | }, change(function (content) {
50 | return content.replace(/\/\*\* wrapper[\s\S]*\\*\*\*\//m, '');
51 | })))
52 | .pipe(gulpif(function (f) {
53 | return f.path.indexOf('.html') !== -1;
54 | }, change(function (content) {
55 | return content.replace(/.*shadow_index\.js.*/, ' \n ');
56 | })))
57 | .pipe(gulp.dest('builds/unpacked/chrome'))
58 | .pipe(zip('chrome.zip'))
59 | .pipe(gulp.dest('builds/packed'));
60 | });
61 | gulp.task('chrome-install', function () {
62 | gulp.src('')
63 | .pipe(wait(1000))
64 | .pipe(shell([
65 | '"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --load-and-launch-app=`pwd` &'
66 | ], {
67 | cwd: './builds/unpacked/chrome'
68 | }));
69 | });
70 |
71 | /* firefox build */
72 | gulp.task('firefox-build', function () {
73 | gulp.src([
74 | 'src/**/*'
75 | ])
76 | .pipe(gulpFilter(function (f) {
77 | if (f.relative.indexOf('.DS_Store') !== -1 || f.relative.indexOf('Thumbs.db') !== -1) {
78 | return false;
79 | }
80 | if (f.path.indexOf('_locales') !== -1) {
81 | return false;
82 | }
83 | if (f.relative.indexOf('chrome') !== -1 &&
84 | f.relative !== 'chrome.manifest' &&
85 | f.relative.indexOf('chrome.png') === -1 &&
86 | f.relative.indexOf('firefox/chrome') === -1
87 | ) {
88 | return false;
89 | }
90 | if (f.relative.indexOf('shadow_index.js') !== -1) {
91 | return false;
92 | }
93 | if (f.relative.indexOf('safari') !== -1) {
94 | return false;
95 | }
96 | if (f.relative.split('/').length === 1) {
97 | return ['package.json', 'chrome.manifest'].indexOf(f.relative) !== -1;
98 | }
99 | return true;
100 | }))
101 | .pipe(gulpif(function (f) {
102 | return f.path.indexOf('.html') !== -1;
103 | }, change(function (content) {
104 | return content.replace(/\n.*shadow_index\.js.*/, '');
105 | })))
106 | .pipe(gulp.dest('builds/unpacked/firefox'));
107 | });
108 | /* firefox pack */
109 | gulp.task('firefox-pack', function () {
110 | gulp.src('')
111 | .pipe(wait(1000))
112 | .pipe(shell([
113 | 'jpm xpi',
114 | 'mv *.xpi ../../packed/firefox.xpi',
115 | 'jpm post --post-url http://localhost:8888/'
116 | ], {
117 | cwd: './builds/unpacked/firefox'
118 | }))
119 | .pipe(shell([
120 | 'zip firefox.xpi icon.png icon64.png',
121 | ], {
122 | cwd: './builds/packed'
123 | }));
124 | });
125 | /* */
126 | gulp.task('chrome', function (callback) {
127 | runSequence('clean', 'chrome-build', 'chrome-install', callback);
128 | });
129 | gulp.task('firefox', function (callback) {
130 | runSequence('clean', 'firefox-build', 'firefox-pack', callback);
131 | });
132 |
--------------------------------------------------------------------------------
/old/src/Icon-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/Icon-64.png
--------------------------------------------------------------------------------
/old/src/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Author
6 | Jeremy Schomery
7 | Builder Version
8 | 10600.4.10.7
9 | CFBundleDisplayName
10 | Reverse Image Search for TinEye
11 | CFBundleIdentifier
12 | com.mybrowseraddon.tineye
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleShortVersionString
16 | 0.1.0
17 | CFBundleVersion
18 | 1
19 | Chrome
20 |
21 | Database Quota
22 | 5242880
23 | Global Page
24 | lib/safari/background.html
25 |
26 | Content
27 |
28 | Scripts
29 |
30 | Start
31 |
32 | data/content_script/inject.js
33 |
34 |
35 | Stylesheets
36 |
37 | data/content_script/inject.css
38 |
39 |
40 | Description
41 | is a powerful reverse image search tool built on top of TinEye engine
42 | DeveloperIdentifier
43 | 2C3W8RZ8ND
44 | ExtensionInfoDictionaryVersion
45 | 1.0
46 | Permissions
47 |
48 | Website Access
49 |
50 | Include Secure Pages
51 |
52 | Level
53 | All
54 |
55 |
56 | Update Manifest URL
57 | https://raw.githubusercontent.com/schomery/easy-screenshot/master/src.safariextension/update.plist
58 | Website
59 | http://mybrowseraddon.com/tineye.html
60 |
61 |
62 |
--------------------------------------------------------------------------------
/old/src/data/content_script/inject.css:
--------------------------------------------------------------------------------
1 | .itrisearch-box {
2 | box-sizing: border-box;
3 | position: fixed;
4 | z-index: 2147483646;
5 | border: gray 1px dotted;
6 | box-shadow: 0 0 0 50000px rgba(0, 0, 0, 0.2);
7 | }
8 | .itrisearch-box:before {
9 | content: '';
10 | display: block;
11 | width: calc(100% + 20px);
12 | height: calc(100% + 20px);
13 | margin-left: -10px;
14 | margin-top: -10px;
15 | cursor: crosshair;
16 | }
17 |
18 | .itrisearch-guide-1,
19 | .itrisearch-guide-2 {
20 | box-sizing: border-box;
21 | position: fixed;
22 | z-index: 2147483646;
23 | }
24 | .itrisearch-guide-1 {
25 | border-right: dashed 1px gray;
26 | top: 0;
27 | left: 0;
28 | height: 100%;
29 | }
30 | .itrisearch-guide-2 {
31 | border-bottom: dashed 1px gray;
32 | top: 0;
33 | width: 100%;
34 | }
35 | .itrisearch-guide-3 {
36 | z-index: 2147483645;
37 | position: fixed;
38 | top: 0;
39 | left: 0;
40 | width: 100%;
41 | height: 100%;
42 | }
43 |
44 | .itrisearch-notification {
45 | position: fixed;
46 | z-index: 2147483646;
47 | right: 20px;
48 | bottom: 20px;
49 | width: 250px;
50 | height: 40px;
51 | line-height: 40px;
52 | background-color: #FFF;
53 | border: solid 2px gray;
54 | padding: 0 5px;
55 | box-shadow: 1px 1px 5px #aaa;
56 | color: #222;
57 | font-family: arial,sans-serif !important;
58 | font-size: 12px !important;
59 | }
60 | .itrisearch-notification button {
61 | position: absolute;
62 | top: 2px;
63 | right: 2px;
64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAMAAADXEh96AAAAilBMVEVEREBEREBEREBEREBEREBEREBEREAlJSMSEhE3NzQAAAAAAAAQEA8BAQEAAAAAAAAAAAAAAAAvLywBAQEAAAAAAAAcHBoAAAAAAAAAAAAAAAAAAAAyMi8AAAAAAAABAQELCwo4ODUAAAAAAAAWFhUsLCkKCgkDAwIAAAAAAAAtLSoCAgIHBwcAAACgX5xYAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAXEYAAFxGARSUQ0EAAAAHdElNRQffBAgGGDS4qporAAAAG0lEQVQI12NgZGRgAGJGMGBggJAMCA5YDsQEAAJ2AB0Q4n77AAAAAElFTkSuQmCC) center center no-repeat;
65 | width: 12px;
66 | height: 12px;
67 | margin: 0;
68 | padding: 0;
69 | border: 0;
70 | cursor: pointer;
71 | opacity: 0.5;
72 | }
73 | .itrisearch-notification button:hover {
74 | opacity: 1.0;
75 | }
76 |
--------------------------------------------------------------------------------
/old/src/data/content_script/inject.js:
--------------------------------------------------------------------------------
1 | /* global self, safari*/
2 | 'use strict';
3 |
4 | var background = {}, manifest = {};
5 | /**** wrapper (start) ****/
6 | if (typeof self !== 'undefined' && self.port) { //Firefox
7 | background.send = function (id, data) {
8 | self.port.emit(id, data);
9 | };
10 | background.receive = function (id, callback) {
11 | self.port.on(id, callback);
12 | };
13 | manifest.url = self.options.base;
14 | self.port.on('detach', function () {
15 | try {
16 | capture.remove();
17 | guide.remove();
18 | notification.remove();
19 | }
20 | catch (e) {}
21 | });
22 | }
23 | else if (typeof safari !== 'undefined') { // Safari
24 | background.send = function (id, obj) {
25 | safari.self.tab.dispatchMessage('message', {
26 | id: id,
27 | data: obj
28 | });
29 | };
30 | background.receive = (function () {
31 | var callbacks = {};
32 | safari.self.addEventListener('message', function (e) {
33 | if (callbacks[e.name]) {
34 | callbacks[e.name](e.message);
35 | }
36 | }, false);
37 |
38 | return function (id, callback) {
39 | callbacks[id] = callback;
40 | };
41 | })();
42 | manifest.url = safari.extension.baseURI;
43 |
44 | document.addEventListener('contextmenu', function (e) {
45 | safari.self.tab.setContextMenuEventUserInfo(event, {
46 | nodeName: e.target.nodeName,
47 | src: e.target.src
48 | });
49 | }, false);
50 | }
51 | else { // Chrome
52 | background.send = function (id, data) {
53 | chrome.runtime.sendMessage({method: id, data: data});
54 | };
55 | background.receive = function (id, callback) {
56 | chrome.runtime.onMessage.addListener(function (request) {
57 | if (request.method === id) {
58 | callback(request.data);
59 | }
60 | });
61 | };
62 | manifest.url = chrome.extension.getURL('./');
63 | }
64 | /**** wrapper (end) ****/
65 |
66 | var capture = (function () {
67 | var box, _left, _top, left, top, width, height;
68 |
69 | function update (e) {
70 | left = (e.clientX > _left ? _left : e.clientX - 1);
71 | top = (e.clientY > _top ? _top : e.clientY - 1);
72 | width = Math.abs(e.clientX - _left);
73 | height = Math.abs(e.clientY - _top);
74 | box.style.left = left + 'px';
75 | box.style.top = top + 'px';
76 | box.style.width = width + 'px';
77 | box.style.height = height + 'px';
78 | }
79 | function remove () {
80 | background.send('capture', {
81 | left: left + 1,
82 | top: top + 1,
83 | width: width - 2,
84 | height: height - 2,
85 | devicePixelRatio: window.devicePixelRatio
86 | });
87 | guide.remove();
88 | capture.remove();
89 | monitor.remove();
90 | }
91 | function mousedown(e) {
92 | // prevent content selection on Firefox
93 | e.stopPropagation();
94 | e.preventDefault();
95 | box = document.createElement('div');
96 | box.setAttribute('class', 'itrisearch-box');
97 |
98 | _left = e.clientX;
99 | _top = e.clientY;
100 |
101 | document.addEventListener('mousemove', update, false);
102 | document.addEventListener('mouseup', remove, false);
103 | document.body.appendChild(box);
104 | }
105 |
106 | return {
107 | install: function () {
108 | document.addEventListener('mousedown', mousedown, false);
109 | },
110 | remove: function () {
111 | document.removeEventListener('mousedown', mousedown, false);
112 | document.removeEventListener('mousemove', update, false);
113 | document.removeEventListener('mouseup', remove, false);
114 | if (box && box.parentNode) {
115 | box.parentNode.removeChild(box);
116 | }
117 | }
118 | };
119 | })();
120 |
121 | var guide = (function () {
122 | var guide1, guide2, guide3;
123 | function position (left, top) {
124 | guide1.style.width = left + 'px';
125 | guide2.style.height = top + 'px';
126 | }
127 | function update (e) {
128 | position(e.clientX, e.clientY);
129 | }
130 | return {
131 | install: function () {
132 | guide1 = document.createElement('div');
133 | guide2 = document.createElement('div');
134 | guide3 = document.createElement('div');
135 | guide1.setAttribute('class', 'itrisearch-guide-1');
136 | guide2.setAttribute('class', 'itrisearch-guide-2');
137 | guide3.setAttribute('class', 'itrisearch-guide-3');
138 | document.body.appendChild(guide3);
139 | document.body.appendChild(guide1);
140 | document.body.appendChild(guide2);
141 | document.addEventListener('mousemove', update, false);
142 | },
143 | remove: function () {
144 | document.removeEventListener('mousemove', update, false);
145 | if (guide1 && guide1.parentNode) {
146 | guide1.parentNode.removeChild(guide1);
147 | }
148 | if (guide2 && guide2.parentNode) {
149 | guide2.parentNode.removeChild(guide2);
150 | }
151 | if (guide3 && guide3.parentNode) {
152 | guide3.parentNode.removeChild(guide3);
153 | }
154 | capture.remove();
155 | }
156 | };
157 | })();
158 |
159 | var monitor = (function () {
160 | function keydown (e) {
161 | if (e.keyCode === 27) {
162 | guide.remove();
163 | capture.remove();
164 | monitor.remove();
165 | }
166 | }
167 | return {
168 | install: function () {
169 | window.addEventListener('keydown', keydown, false);
170 | },
171 | remove: function () {
172 | window.removeEventListener('keydown', keydown, false);
173 | }
174 | };
175 | })();
176 |
177 | var notification = (function () {
178 | var box;
179 | return {
180 | install: function () {
181 | box = document.createElement('div');
182 | box.setAttribute('class', 'itrisearch-notification');
183 | var span = document.createElement('span');
184 | var button = document.createElement('button');
185 | button.setAttribute('type', 'close');
186 | button.addEventListener('click', function () {
187 | notification.hide();
188 | });
189 | box.appendChild(span);
190 | box.appendChild(button);
191 | document.body.appendChild(box);
192 | },
193 | display: function (msg) {
194 | if (!box) {
195 | this.install();
196 | }
197 | box.style.display = 'block';
198 | box.querySelector('span').textContent = msg;
199 | },
200 | hide: function () {
201 | box.style.display = 'none';
202 | },
203 | remove: function () {
204 | if (box && box.parentNode) {
205 | box.parentNode.removeChild(box);
206 | }
207 | }
208 | };
209 | })();
210 |
211 | background.receive('notify', function (msg) {
212 | if (msg) {
213 | notification.display(msg);
214 | }
215 | else {
216 | notification.hide();
217 | }
218 | });
219 |
220 | background.receive('capture', function () {
221 | guide.install();
222 | capture.install();
223 | monitor.install();
224 | });
225 |
--------------------------------------------------------------------------------
/old/src/data/firefox/chrome.js:
--------------------------------------------------------------------------------
1 | /* globals content, addMessageListener, removeMessageListener, sendAsyncMessage */
2 | 'use strict';
3 |
4 | (function (observers) {
5 | var active = true;
6 | var id = 'itrisearch';
7 |
8 | function connect (obj) {
9 | sendAsyncMessage(id + '-connect', obj);
10 | }
11 |
12 | observers.screenshot = function (e) {
13 | var thumbnail = content.document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
14 | var left = e.data.left || 0;
15 | var top = e.data.top || 0;
16 | var width = e.data.width || content.innerWidth;
17 | var height = e.data.height || content.innerHeight;
18 | thumbnail.width = width;
19 | thumbnail.height = height;
20 | var ctx = thumbnail.getContext('2d');
21 | ctx.drawWindow(content, content.scrollX + left, content.scrollY + top, width, height, '#fff');
22 | thumbnail.toBlob(function (blob) {
23 | connect(blob);
24 | });
25 | };
26 |
27 | function detach () {
28 | for (var name in observers) {
29 | removeMessageListener(id + '-' + name, observers[name]);
30 | }
31 | removeMessageListener(id + '-detach', detach);
32 | active = false;
33 | }
34 | if (active) {
35 | for (var name in observers) {
36 | addMessageListener(id + '-' + name, observers[name]);
37 | }
38 | addMessageListener(id + '-detach', detach);
39 | }
40 | })({});
41 |
--------------------------------------------------------------------------------
/old/src/data/icons/128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/128.png
--------------------------------------------------------------------------------
/old/src/data/icons/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/16.png
--------------------------------------------------------------------------------
/old/src/data/icons/24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/24.png
--------------------------------------------------------------------------------
/old/src/data/icons/256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/256.png
--------------------------------------------------------------------------------
/old/src/data/icons/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/32.png
--------------------------------------------------------------------------------
/old/src/data/icons/48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/48.png
--------------------------------------------------------------------------------
/old/src/data/icons/64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schomery/reverse-image-search/ccafab4b2896ad0e012be609b3a655751cfec86c/old/src/data/icons/64.png
--------------------------------------------------------------------------------
/old/src/lib/chrome/background.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/old/src/lib/chrome/chrome.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var app = {};
4 |
5 | if (!Promise.defer) {
6 | Promise.defer = function () {
7 | var deferred = {};
8 | var promise = new Promise(function (resolve, reject) {
9 | deferred.resolve = resolve;
10 | deferred.reject = reject;
11 | });
12 | deferred.promise = promise;
13 | return deferred;
14 | };
15 | }
16 | app.Promise = Promise;
17 |
18 | app.storage = {
19 | read: function (id) {
20 | return localStorage[id] || null;
21 | },
22 | write: function (id, data) {
23 | localStorage[id] = data + '';
24 | }
25 | };
26 |
27 | app.inject = {
28 | send: function (id, data, global) {
29 | if (global) {
30 | chrome.tabs.query({}, function (tabs) {
31 | tabs.forEach(function (tab) {
32 | chrome.tabs.sendMessage(tab.id, {method: id, data: data}, function () {});
33 | });
34 | });
35 | }
36 | else if ('id' in this && 'windowId' in this) {
37 | chrome.tabs.sendMessage(this.id, {method: id, data: data}, function () {});
38 | }
39 | else {
40 | chrome.tabs.query({active: true, currentWindow: true}, function (tabs) {
41 | tabs.forEach(function (tab) {
42 | chrome.tabs.sendMessage(tab.id, {method: id, data: data}, function () {});
43 | });
44 | });
45 | }
46 | },
47 | receive: function (id, callback) {
48 | chrome.runtime.onMessage.addListener(function (message, sender) {
49 | if (message.method === id && sender.tab && sender.tab.url.indexOf('http') === 0) {
50 | callback.call(sender.tab, message.data);
51 | }
52 | });
53 | }
54 | };
55 |
56 | app.tab = {
57 | open: function (url) {
58 | chrome.tabs.create({
59 | url: url
60 | });
61 | }
62 | };
63 |
64 | app.context_menu = {
65 | create: function (title, img, type, callback) {
66 | chrome.contextMenus.create({
67 | 'type': 'normal',
68 | 'title': title,
69 | 'contexts': [type === 'img' ? 'image' : 'page'],
70 | 'onclick': function (info) {
71 | callback(info.srcUrl);
72 | }
73 | });
74 | }
75 | };
76 |
77 | app.version = function () {
78 | return chrome[chrome.runtime && chrome.runtime.getManifest ? 'runtime' : 'extension'].getManifest().version;
79 | };
80 |
81 | app.timer = window;
82 |
83 | app.screenshot = function (left, top, width, height, devicePixelRatio) {
84 | var d = Promise.defer();
85 | left = left * devicePixelRatio;
86 | top = top * devicePixelRatio;
87 | width = width * devicePixelRatio;
88 | height = height * devicePixelRatio;
89 |
90 | chrome.tabs.query({
91 | active: true,
92 | currentWindow: true
93 | }, function (tab) {
94 | chrome.tabs.captureVisibleTab(tab.windowId, {format: 'png'}, function (dataUrl) {
95 | var canvas = document.createElement('canvas');
96 | var ctx = canvas.getContext('2d');
97 | var img = new Image();
98 | img.onload = function () {
99 | canvas.width = width || img.width;
100 | canvas.height = height || img.height;
101 | if (width && height) {
102 | ctx.drawImage(img, left, top, width, height, 0, 0, width, height);
103 | }
104 | else {
105 | ctx.drawImage(img, 0, 0);
106 | }
107 | canvas.toBlob(function (blob) {
108 | d.resolve(blob);
109 | });
110 | };
111 | img.src = dataUrl;
112 | });
113 | });
114 | return d.promise;
115 | };
116 |
117 | app.FormData = window.FormData;
118 | app.XMLHttpRequest = window.XMLHttpRequest;
119 |
--------------------------------------------------------------------------------
/old/src/lib/chrome/toBlob.js:
--------------------------------------------------------------------------------
1 | if (!HTMLCanvasElement.prototype.toBlob) {
2 | Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
3 | value: function (callback, type, quality) {
4 |
5 | var binStr = atob( this.toDataURL(type, quality).split(',')[1] ),
6 | len = binStr.length,
7 | arr = new Uint8Array(len);
8 |
9 | for (var i=0; i
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/old/src/lib/safari/q.js:
--------------------------------------------------------------------------------
1 | // vim:ts=4:sts=4:sw=4:
2 | /*!
3 | *
4 | * Copyright 2009-2012 Kris Kowal under the terms of the MIT
5 | * license found at http://github.com/kriskowal/q/raw/master/LICENSE
6 | *
7 | * With parts by Tyler Close
8 | * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
9 | * at http://www.opensource.org/licenses/mit-license.html
10 | * Forked at ref_send.js version: 2009-05-11
11 | *
12 | * With parts by Mark Miller
13 | * Copyright (C) 2011 Google Inc.
14 | *
15 | * Licensed under the Apache License, Version 2.0 (the "License");
16 | * you may not use this file except in compliance with the License.
17 | * You may obtain a copy of the License at
18 | *
19 | * http://www.apache.org/licenses/LICENSE-2.0
20 | *
21 | * Unless required by applicable law or agreed to in writing, software
22 | * distributed under the License is distributed on an "AS IS" BASIS,
23 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 | * See the License for the specific language governing permissions and
25 | * limitations under the License.
26 | *
27 | */
28 |
29 | (function (definition) {
30 | // Turn off strict mode for this function so we can assign to global.Q
31 | /* jshint strict: false */
32 |
33 | // This file will function properly as a
5 |
6 |
7 |
8 |
9 |