├── .gitignore
├── LICENSE
├── README.md
├── cloud-function
├── firebase.json
└── functions
│ ├── .eslintrc.json
│ ├── index.js
│ └── package.json
└── extension
├── background.js
├── browser_style.css
├── icons
├── icon-128.png
├── icon-16.png
├── icon-19.png
├── icon-24.png
├── icon-32.png
├── icon-38.png
├── icon-64.png
└── icon.svg
├── manifest.chrome.json
├── manifest.firefox.json
├── options_ui
└── options.html
├── package.json
├── page
├── report.html
├── reporter.js
└── styles.css
├── web-ext-config.chrome.js
└── web-ext-config.firefox.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .firebaserc
2 | .vscode
3 | node_modules/
4 | extension/*artifacts/
5 | extension/manifest.json
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Mozilla Public License Version 2.0
2 | ==================================
3 |
4 | 1. Definitions
5 | --------------
6 |
7 | 1.1. "Contributor"
8 | means each individual or legal entity that creates, contributes to
9 | the creation of, or owns Covered Software.
10 |
11 | 1.2. "Contributor Version"
12 | means the combination of the Contributions of others (if any) used
13 | by a Contributor and that particular Contributor's Contribution.
14 |
15 | 1.3. "Contribution"
16 | means Covered Software of a particular Contributor.
17 |
18 | 1.4. "Covered Software"
19 | means Source Code Form to which the initial Contributor has attached
20 | the notice in Exhibit A, the Executable Form of such Source Code
21 | Form, and Modifications of such Source Code Form, in each case
22 | including portions thereof.
23 |
24 | 1.5. "Incompatible With Secondary Licenses"
25 | means
26 |
27 | (a) that the initial Contributor has attached the notice described
28 | in Exhibit B to the Covered Software; or
29 |
30 | (b) that the Covered Software was made available under the terms of
31 | version 1.1 or earlier of the License, but not also under the
32 | terms of a Secondary License.
33 |
34 | 1.6. "Executable Form"
35 | means any form of the work other than Source Code Form.
36 |
37 | 1.7. "Larger Work"
38 | means a work that combines Covered Software with other material, in
39 | a separate file or files, that is not Covered Software.
40 |
41 | 1.8. "License"
42 | means this document.
43 |
44 | 1.9. "Licensable"
45 | means having the right to grant, to the maximum extent possible,
46 | whether at the time of the initial grant or subsequently, any and
47 | all of the rights conveyed by this License.
48 |
49 | 1.10. "Modifications"
50 | means any of the following:
51 |
52 | (a) any file in Source Code Form that results from an addition to,
53 | deletion from, or modification of the contents of Covered
54 | Software; or
55 |
56 | (b) any new file in Source Code Form that contains any Covered
57 | Software.
58 |
59 | 1.11. "Patent Claims" of a Contributor
60 | means any patent claim(s), including without limitation, method,
61 | process, and apparatus claims, in any patent Licensable by such
62 | Contributor that would be infringed, but for the grant of the
63 | License, by the making, using, selling, offering for sale, having
64 | made, import, or transfer of either its Contributions or its
65 | Contributor Version.
66 |
67 | 1.12. "Secondary License"
68 | means either the GNU General Public License, Version 2.0, the GNU
69 | Lesser General Public License, Version 2.1, the GNU Affero General
70 | Public License, Version 3.0, or any later versions of those
71 | licenses.
72 |
73 | 1.13. "Source Code Form"
74 | means the form of the work preferred for making modifications.
75 |
76 | 1.14. "You" (or "Your")
77 | means an individual or a legal entity exercising rights under this
78 | License. For legal entities, "You" includes any entity that
79 | controls, is controlled by, or is under common control with You. For
80 | purposes of this definition, "control" means (a) the power, direct
81 | or indirect, to cause the direction or management of such entity,
82 | whether by contract or otherwise, or (b) ownership of more than
83 | fifty percent (50%) of the outstanding shares or beneficial
84 | ownership of such entity.
85 |
86 | 2. License Grants and Conditions
87 | --------------------------------
88 |
89 | 2.1. Grants
90 |
91 | Each Contributor hereby grants You a world-wide, royalty-free,
92 | non-exclusive license:
93 |
94 | (a) under intellectual property rights (other than patent or trademark)
95 | Licensable by such Contributor to use, reproduce, make available,
96 | modify, display, perform, distribute, and otherwise exploit its
97 | Contributions, either on an unmodified basis, with Modifications, or
98 | as part of a Larger Work; and
99 |
100 | (b) under Patent Claims of such Contributor to make, use, sell, offer
101 | for sale, have made, import, and otherwise transfer either its
102 | Contributions or its Contributor Version.
103 |
104 | 2.2. Effective Date
105 |
106 | The licenses granted in Section 2.1 with respect to any Contribution
107 | become effective for each Contribution on the date the Contributor first
108 | distributes such Contribution.
109 |
110 | 2.3. Limitations on Grant Scope
111 |
112 | The licenses granted in this Section 2 are the only rights granted under
113 | this License. No additional rights or licenses will be implied from the
114 | distribution or licensing of Covered Software under this License.
115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a
116 | Contributor:
117 |
118 | (a) for any code that a Contributor has removed from Covered Software;
119 | or
120 |
121 | (b) for infringements caused by: (i) Your and any other third party's
122 | modifications of Covered Software, or (ii) the combination of its
123 | Contributions with other software (except as part of its Contributor
124 | Version); or
125 |
126 | (c) under Patent Claims infringed by Covered Software in the absence of
127 | its Contributions.
128 |
129 | This License does not grant any rights in the trademarks, service marks,
130 | or logos of any Contributor (except as may be necessary to comply with
131 | the notice requirements in Section 3.4).
132 |
133 | 2.4. Subsequent Licenses
134 |
135 | No Contributor makes additional grants as a result of Your choice to
136 | distribute the Covered Software under a subsequent version of this
137 | License (see Section 10.2) or under the terms of a Secondary License (if
138 | permitted under the terms of Section 3.3).
139 |
140 | 2.5. Representation
141 |
142 | Each Contributor represents that the Contributor believes its
143 | Contributions are its original creation(s) or it has sufficient rights
144 | to grant the rights to its Contributions conveyed by this License.
145 |
146 | 2.6. Fair Use
147 |
148 | This License is not intended to limit any rights You have under
149 | applicable copyright doctrines of fair use, fair dealing, or other
150 | equivalents.
151 |
152 | 2.7. Conditions
153 |
154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155 | in Section 2.1.
156 |
157 | 3. Responsibilities
158 | -------------------
159 |
160 | 3.1. Distribution of Source Form
161 |
162 | All distribution of Covered Software in Source Code Form, including any
163 | Modifications that You create or to which You contribute, must be under
164 | the terms of this License. You must inform recipients that the Source
165 | Code Form of the Covered Software is governed by the terms of this
166 | License, and how they can obtain a copy of this License. You may not
167 | attempt to alter or restrict the recipients' rights in the Source Code
168 | Form.
169 |
170 | 3.2. Distribution of Executable Form
171 |
172 | If You distribute Covered Software in Executable Form then:
173 |
174 | (a) such Covered Software must also be made available in Source Code
175 | Form, as described in Section 3.1, and You must inform recipients of
176 | the Executable Form how they can obtain a copy of such Source Code
177 | Form by reasonable means in a timely manner, at a charge no more
178 | than the cost of distribution to the recipient; and
179 |
180 | (b) You may distribute such Executable Form under the terms of this
181 | License, or sublicense it under different terms, provided that the
182 | license for the Executable Form does not attempt to limit or alter
183 | the recipients' rights in the Source Code Form under this License.
184 |
185 | 3.3. Distribution of a Larger Work
186 |
187 | You may create and distribute a Larger Work under terms of Your choice,
188 | provided that You also comply with the requirements of this License for
189 | the Covered Software. If the Larger Work is a combination of Covered
190 | Software with a work governed by one or more Secondary Licenses, and the
191 | Covered Software is not Incompatible With Secondary Licenses, this
192 | License permits You to additionally distribute such Covered Software
193 | under the terms of such Secondary License(s), so that the recipient of
194 | the Larger Work may, at their option, further distribute the Covered
195 | Software under the terms of either this License or such Secondary
196 | License(s).
197 |
198 | 3.4. Notices
199 |
200 | You may not remove or alter the substance of any license notices
201 | (including copyright notices, patent notices, disclaimers of warranty,
202 | or limitations of liability) contained within the Source Code Form of
203 | the Covered Software, except that You may alter any license notices to
204 | the extent required to remedy known factual inaccuracies.
205 |
206 | 3.5. Application of Additional Terms
207 |
208 | You may choose to offer, and to charge a fee for, warranty, support,
209 | indemnity or liability obligations to one or more recipients of Covered
210 | Software. However, You may do so only on Your own behalf, and not on
211 | behalf of any Contributor. You must make it absolutely clear that any
212 | such warranty, support, indemnity, or liability obligation is offered by
213 | You alone, and You hereby agree to indemnify every Contributor for any
214 | liability incurred by such Contributor as a result of warranty, support,
215 | indemnity or liability terms You offer. You may include additional
216 | disclaimers of warranty and limitations of liability specific to any
217 | jurisdiction.
218 |
219 | 4. Inability to Comply Due to Statute or Regulation
220 | ---------------------------------------------------
221 |
222 | If it is impossible for You to comply with any of the terms of this
223 | License with respect to some or all of the Covered Software due to
224 | statute, judicial order, or regulation then You must: (a) comply with
225 | the terms of this License to the maximum extent possible; and (b)
226 | describe the limitations and the code they affect. Such description must
227 | be placed in a text file included with all distributions of the Covered
228 | Software under this License. Except to the extent prohibited by statute
229 | or regulation, such description must be sufficiently detailed for a
230 | recipient of ordinary skill to be able to understand it.
231 |
232 | 5. Termination
233 | --------------
234 |
235 | 5.1. The rights granted under this License will terminate automatically
236 | if You fail to comply with any of its terms. However, if You become
237 | compliant, then the rights granted under this License from a particular
238 | Contributor are reinstated (a) provisionally, unless and until such
239 | Contributor explicitly and finally terminates Your grants, and (b) on an
240 | ongoing basis, if such Contributor fails to notify You of the
241 | non-compliance by some reasonable means prior to 60 days after You have
242 | come back into compliance. Moreover, Your grants from a particular
243 | Contributor are reinstated on an ongoing basis if such Contributor
244 | notifies You of the non-compliance by some reasonable means, this is the
245 | first time You have received notice of non-compliance with this License
246 | from such Contributor, and You become compliant prior to 30 days after
247 | Your receipt of the notice.
248 |
249 | 5.2. If You initiate litigation against any entity by asserting a patent
250 | infringement claim (excluding declaratory judgment actions,
251 | counter-claims, and cross-claims) alleging that a Contributor Version
252 | directly or indirectly infringes any patent, then the rights granted to
253 | You by any and all Contributors for the Covered Software under Section
254 | 2.1 of this License shall terminate.
255 |
256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257 | end user license agreements (excluding distributors and resellers) which
258 | have been validly granted by You or Your distributors under this License
259 | prior to termination shall survive termination.
260 |
261 | ************************************************************************
262 | * *
263 | * 6. Disclaimer of Warranty *
264 | * ------------------------- *
265 | * *
266 | * Covered Software is provided under this License on an "as is" *
267 | * basis, without warranty of any kind, either expressed, implied, or *
268 | * statutory, including, without limitation, warranties that the *
269 | * Covered Software is free of defects, merchantable, fit for a *
270 | * particular purpose or non-infringing. The entire risk as to the *
271 | * quality and performance of the Covered Software is with You. *
272 | * Should any Covered Software prove defective in any respect, You *
273 | * (not any Contributor) assume the cost of any necessary servicing, *
274 | * repair, or correction. This disclaimer of warranty constitutes an *
275 | * essential part of this License. No use of any Covered Software is *
276 | * authorized under this License except under this disclaimer. *
277 | * *
278 | ************************************************************************
279 |
280 | ************************************************************************
281 | * *
282 | * 7. Limitation of Liability *
283 | * -------------------------- *
284 | * *
285 | * Under no circumstances and under no legal theory, whether tort *
286 | * (including negligence), contract, or otherwise, shall any *
287 | * Contributor, or anyone who distributes Covered Software as *
288 | * permitted above, be liable to You for any direct, indirect, *
289 | * special, incidental, or consequential damages of any character *
290 | * including, without limitation, damages for lost profits, loss of *
291 | * goodwill, work stoppage, computer failure or malfunction, or any *
292 | * and all other commercial damages or losses, even if such party *
293 | * shall have been informed of the possibility of such damages. This *
294 | * limitation of liability shall not apply to liability for death or *
295 | * personal injury resulting from such party's negligence to the *
296 | * extent applicable law prohibits such limitation. Some *
297 | * jurisdictions do not allow the exclusion or limitation of *
298 | * incidental or consequential damages, so this exclusion and *
299 | * limitation may not apply to You. *
300 | * *
301 | ************************************************************************
302 |
303 | 8. Litigation
304 | -------------
305 |
306 | Any litigation relating to this License may be brought only in the
307 | courts of a jurisdiction where the defendant maintains its principal
308 | place of business and such litigation shall be governed by laws of that
309 | jurisdiction, without reference to its conflict-of-law provisions.
310 | Nothing in this Section shall prevent a party's ability to bring
311 | cross-claims or counter-claims.
312 |
313 | 9. Miscellaneous
314 | ----------------
315 |
316 | This License represents the complete agreement concerning the subject
317 | matter hereof. If any provision of this License is held to be
318 | unenforceable, such provision shall be reformed only to the extent
319 | necessary to make it enforceable. Any law or regulation which provides
320 | that the language of a contract shall be construed against the drafter
321 | shall not be used to construe this License against a Contributor.
322 |
323 | 10. Versions of the License
324 | ---------------------------
325 |
326 | 10.1. New Versions
327 |
328 | Mozilla Foundation is the license steward. Except as provided in Section
329 | 10.3, no one other than the license steward has the right to modify or
330 | publish new versions of this License. Each version will be given a
331 | distinguishing version number.
332 |
333 | 10.2. Effect of New Versions
334 |
335 | You may distribute the Covered Software under the terms of the version
336 | of the License under which You originally received the Covered Software,
337 | or under the terms of any subsequent version published by the license
338 | steward.
339 |
340 | 10.3. Modified Versions
341 |
342 | If you create software not governed by this License, and you want to
343 | create a new license for such software, you may create and use a
344 | modified version of this License if you rename the license and remove
345 | any references to the name of the license steward (except to note that
346 | such modified license differs from this License).
347 |
348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary
349 | Licenses
350 |
351 | If You choose to distribute Source Code Form that is Incompatible With
352 | Secondary Licenses under the terms of this version of the License, the
353 | notice described in Exhibit B of this License must be attached.
354 |
355 | Exhibit A - Source Code Form License Notice
356 | -------------------------------------------
357 |
358 | This Source Code Form is subject to the terms of the Mozilla Public
359 | License, v. 2.0. If a copy of the MPL was not distributed with this
360 | file, You can obtain one at http://mozilla.org/MPL/2.0/.
361 |
362 | If it is not possible or desirable to put the notice in a particular
363 | file, then You may include the notice in a location (such as a LICENSE
364 | file in a relevant directory) where a recipient would be likely to look
365 | for such a notice.
366 |
367 | You may add additional accurate notices of copyright ownership.
368 |
369 | Exhibit B - "Incompatible With Secondary Licenses" Notice
370 | ---------------------------------------------------------
371 |
372 | This Source Code Form is "Incompatible With Secondary Licenses", as
373 | defined by the Mozilla Public License, v. 2.0.
374 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | In-Page Pop-up Reporter
2 | =======================
3 |
4 | Are you tired of seeing in-page popups like this?
5 |
6 | 
7 |
8 | Mozilla is experimenting with a popup blocker to dismiss them automatically, and are curating a dataset for it. This extension provides an easy way to report pages that show pop-ups like this.
9 |
10 | Download
11 | --------
12 |
13 | [Firefox extension](https://addons.mozilla.org/en-US/firefox/addon/in-page-pop-up-reporter/)
14 |
15 | [Chrome extension](https://chrome.google.com/webstore/detail/in-page-pop-up-reporter/dkpphegmeomaffjanagefmejpeebfcmh)
16 |
17 | Installation
18 | ------------
19 |
20 | This extension reports data into a Google Spreadsheet. In order to not include the ID and auth info for the spreadsheet in the extension code, we use a Google Cloud lambda function to access the Google sheets API.
21 |
22 | In order to deploy the firebase app, the first step is to visit the [Google APIs API Manager](https://console.developers.google.com/apis/credentials) and create Oauth 2.0 credentials. Click the Create Credentials button, then Oauth client ID, then Web Application (Google’s directions are [here](https://support.google.com/cloud/answer/6158849?hl=en)). In authorized redirect URIs, you’ll need to enter "https://`{YOUR-FUNCTIONS-SUBDOMAIN}`.cloudfunctions.net/Oauthcallback".
23 |
24 | You will also need to change the `FUNCTIONS_SUBDOMAIN` constant in the beginning of `extension/background.js` to point to your Google Cloud function endpoint.
25 |
26 | After that, you need to enter the following commands. You need to replace `xxxxx` with the correct values depending on your environment.
27 |
28 | ```
29 | cd cloud-function
30 | cd functions
31 | firebase login
32 | # Enter the configuration settings
33 | firebase functions:config:set googleapi.client_id="xxxxx" googleapi.client_secret="xxxxx" googleapi.spreadsheet_id="xxxxx" googleapi.function_subdomain="xxxxx"
34 | firebase deploy --only functions
35 |
36 | # Build the extension
37 | cd ../..
38 | cd extension
39 | npm install
40 | npm run firefox # extension built in firefox-artifacts/
41 | npm run chrome # extension built in chrome-artifacts/
42 | ```
43 | Once the functions are deployed, you need to visit this URL in your browser to authenticate your spreadsheet access on the Google Cloud side to ensure the extension will have access to update the spreadsheet: https://`{YOUR-FUNCTIONS-SUBDOMAIN}`.cloudfunctions.net/authGoogleAPI.
44 |
45 | Acknowledgements
46 | ----------------
47 | [This guide](https://medium.com/@elon.danziger/fast-flexible-and-free-visualizing-newborn-health-data-with-firebase-nodejs-and-google-sheets-1f73465a18bc) was used as a tutorial on how to talk to the Google Sheets API using Google Cloud functions.
48 |
--------------------------------------------------------------------------------
/cloud-function/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "functions": {
3 | "predeploy": [
4 | "npm --prefix \"$RESOURCE_DIR\" run lint"
5 | ]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/cloud-function/functions/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "parserOptions": {
3 | // Required for certain syntax usages
4 | "ecmaVersion": 6
5 | },
6 | "plugins": [
7 | "promise"
8 | ],
9 | "extends": "eslint:recommended",
10 | "rules": {
11 | // Removed rule "disallow the use of console" from recommended eslint rules
12 | "no-console": "off",
13 |
14 | // Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
15 | "no-regex-spaces": "off",
16 |
17 | // Removed rule "disallow the use of debugger" from recommended eslint rules
18 | "no-debugger": "off",
19 |
20 | // Removed rule "disallow unused variables" from recommended eslint rules
21 | "no-unused-vars": "off",
22 |
23 | // Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
24 | "no-mixed-spaces-and-tabs": "off",
25 |
26 | // Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
27 | "no-undef": "off",
28 |
29 | // Warn against template literal placeholder syntax in regular strings
30 | "no-template-curly-in-string": 1,
31 |
32 | // Warn if return statements do not either always or never specify values
33 | "consistent-return": 1,
34 |
35 | // Warn if no return statements in callbacks of array methods
36 | "array-callback-return": 1,
37 |
38 | // Require the use of === and !==
39 | "eqeqeq": 2,
40 |
41 | // Disallow the use of alert, confirm, and prompt
42 | "no-alert": 2,
43 |
44 | // Disallow the use of arguments.caller or arguments.callee
45 | "no-caller": 2,
46 |
47 | // Disallow null comparisons without type-checking operators
48 | "no-eq-null": 2,
49 |
50 | // Disallow the use of eval()
51 | "no-eval": 2,
52 |
53 | // Warn against extending native types
54 | "no-extend-native": 1,
55 |
56 | // Warn against unnecessary calls to .bind()
57 | "no-extra-bind": 1,
58 |
59 | // Warn against unnecessary labels
60 | "no-extra-label": 1,
61 |
62 | // Disallow leading or trailing decimal points in numeric literals
63 | "no-floating-decimal": 2,
64 |
65 | // Warn against shorthand type conversions
66 | "no-implicit-coercion": 1,
67 |
68 | // Warn against function declarations and expressions inside loop statements
69 | "no-loop-func": 1,
70 |
71 | // Disallow new operators with the Function object
72 | "no-new-func": 2,
73 |
74 | // Warn against new operators with the String, Number, and Boolean objects
75 | "no-new-wrappers": 1,
76 |
77 | // Disallow throwing literals as exceptions
78 | "no-throw-literal": 2,
79 |
80 | // Require using Error objects as Promise rejection reasons
81 | "prefer-promise-reject-errors": 2,
82 |
83 | // Enforce “for” loop update clause moving the counter in the right direction
84 | "for-direction": 2,
85 |
86 | // Enforce return statements in getters
87 | "getter-return": 2,
88 |
89 | // Disallow await inside of loops
90 | "no-await-in-loop": 2,
91 |
92 | // Disallow comparing against -0
93 | "no-compare-neg-zero": 2,
94 |
95 | // Warn against catch clause parameters from shadowing variables in the outer scope
96 | "no-catch-shadow": 1,
97 |
98 | // Disallow identifiers from shadowing restricted names
99 | "no-shadow-restricted-names": 2,
100 |
101 | // Enforce return statements in callbacks of array methods
102 | "callback-return": 2,
103 |
104 | // Require error handling in callbacks
105 | "handle-callback-err": 2,
106 |
107 | // Warn against string concatenation with __dirname and __filename
108 | "no-path-concat": 1,
109 |
110 | // Prefer using arrow functions for callbacks
111 | "prefer-arrow-callback": 1,
112 |
113 | // Return inside each then() to create readable and reusable Promise chains.
114 | // Forces developers to return console logs and http calls in promises.
115 | "promise/always-return": 2,
116 |
117 | //Enforces the use of catch() on un-returned promises
118 | "promise/catch-or-return": 2,
119 |
120 | // Warn against nested then() or catch() statements
121 | "promise/no-nesting": 1
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/cloud-function/functions/index.js:
--------------------------------------------------------------------------------
1 | const functions = require('firebase-functions');
2 | const admin = require('firebase-admin');
3 | const cors = require('cors')({origin:'*', methods:['POST']});
4 | const process = require('process');
5 | const moment = require('moment');
6 |
7 | admin.initializeApp(functions.config().firebase);
8 | const db = admin.database();
9 |
10 | const FUNCTIONS_SUBDOMAIN = functions.config().googleapi.function_subdomain;
11 | const SHEET_ID = functions.config().googleapi.spreadsheet_id;
12 |
13 | const FUNCTIONS_CLIENT_ID = functions.config().googleapi.client_id;
14 | const FUNCTIONS_SECRET_KEY = functions.config().googleapi.client_secret;
15 | const FUNCTIONS_REDIRECT = 'https://' + FUNCTIONS_SUBDOMAIN + '.cloudfunctions.net/OauthCallback';
16 |
17 | const {OAuth2Client} = require('google-auth-library');
18 | const {google} = require('googleapis');
19 |
20 | let functionsOauthClient = new OAuth2Client(FUNCTIONS_CLIENT_ID, FUNCTIONS_SECRET_KEY,
21 | FUNCTIONS_REDIRECT);
22 |
23 | let oauthTokens = null;
24 |
25 | const SCOPES = ['https://www.googleapis.com/auth/spreadsheets'];
26 |
27 | process.on('unhandledRejection', reason => {
28 | console.error("Unhandled rejection: " + reason);
29 | });
30 |
31 | // visit the URL for this Function to obtain tokens
32 | exports.authGoogleAPI = functions.https.onRequest((req, res) =>
33 | res.redirect(functionsOauthClient.generateAuthUrl({
34 | access_type: 'offline',
35 | scope: SCOPES,
36 | prompt: 'consent'
37 | }))
38 | );
39 |
40 | // after you grant access, you will be redirected to the URL for this Function
41 | // this Function stores the tokens to your Firebase database
42 | const DB_TOKEN_PATH = '/api_tokens';
43 | exports.OauthCallback = functions.https.onRequest((req, res) => {
44 | const code = req.query.code;
45 | functionsOauthClient.getToken(code, (err, tokens) => {
46 | // Now tokens contains an access_token and an optional refresh_token. Save them.
47 | if (err) {
48 | return res.status(400).send(err);
49 | }
50 | return db.ref(DB_TOKEN_PATH).set(tokens).then(() => res.status(200).send('OK'));
51 | });
52 | });
53 |
54 | // checks if oauthTokens have been loaded into memory, and if not, retrieves them
55 | function getAuthorizedClient() {
56 | return new Promise((resolve, reject) => {
57 | if (oauthTokens) {
58 | return resolve(functionsOauthClient);
59 | }
60 | return db.ref(DB_TOKEN_PATH).once('value').then((snapshot) => {
61 | oauthTokens = snapshot.val();
62 | functionsOauthClient.setCredentials(oauthTokens);
63 | return resolve(functionsOauthClient);
64 | }).catch((err) => reject(err));
65 | });
66 | }
67 |
68 | // accepts an append request, returns a Promise to append it, enriching it with auth
69 | function appendPromise(requestWithoutAuth) {
70 | return new Promise((resolve, reject) => {
71 | return getAuthorizedClient().then((client) => {
72 | const sheets = google.sheets('v4');
73 | const request = requestWithoutAuth;
74 | request.auth = client;
75 | console.log("before calling into sheets");
76 | return new Promise((resolve, reject) => {
77 | sheets.spreadsheets.values.append(request, (err, response) => {
78 | if (err) {
79 | console.log(`The API returned an error: ${err}`);
80 | return reject(err);
81 | }
82 | return resolve(response);
83 | });
84 | });
85 | }).catch((err) => reject(err));
86 | });
87 | }
88 |
89 | exports.appendRecordToSpreadsheet = functions.https.onRequest((req, res) => {
90 | let url = req.body.url;
91 | let desc = req.body.desc;
92 | let platform = req.body.platform;
93 | let now = moment().format('M/D/YYYY H:m:s');
94 | return cors(req, res, () => {
95 | return appendPromise({
96 | spreadsheetId: SHEET_ID,
97 | range: 'A:D',
98 | valueInputOption: 'USER_ENTERED',
99 | insertDataOption: 'INSERT_ROWS',
100 | resource: {
101 | values: [[now, url, desc, platform]]
102 | }
103 | }).then(res.status(200).send('OK'));
104 | });
105 | });
--------------------------------------------------------------------------------
/cloud-function/functions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "functions",
3 | "description": "Cloud Functions for Firebase",
4 | "scripts": {
5 | "lint": "eslint .",
6 | "serve": "firebase serve --only functions",
7 | "shell": "firebase experimental:functions:shell",
8 | "start": "npm run shell",
9 | "deploy": "firebase deploy --only functions",
10 | "logs": "firebase functions:log"
11 | },
12 | "dependencies": {
13 | "cors": "^2.8.4",
14 | "firebase-admin": "^5.10.0",
15 | "firebase-functions": "^0.8.1",
16 | "google-auth-library": "^1.3.1",
17 | "googleapis": "^27.0.0",
18 | "moment": "^2.21.0",
19 | "process": "^0.11.10"
20 | },
21 | "devDependencies": {
22 | "eslint": "^4.12.0",
23 | "eslint-plugin-promise": "^3.6.0"
24 | },
25 | "private": true
26 | }
27 |
--------------------------------------------------------------------------------
/extension/background.js:
--------------------------------------------------------------------------------
1 | const FUNCTIONS_SUBDOMAIN = 'us-central1-orbital-hawk-197700';
2 |
3 | chrome.runtime.onMessage.addListener(notify);
4 |
5 | function getPlatformInfo() {
6 | try {
7 | return browser.runtime.getPlatformInfo();
8 | } catch (e) {
9 | return new Promise((resolve, reject) => {
10 | chrome.runtime.getPlatformInfo(function(info) {
11 | resolve(info);
12 | });
13 | });
14 | }
15 | }
16 |
17 | function notify(message) {
18 | if (message.type != "fetch") {
19 | return;
20 | }
21 | getPlatformInfo()
22 | .then(info => info.os)
23 | .then(os => {
24 | let platform = (os == "android") ? "Mobile" : "Desktop";
25 | return {
26 | url: message.url,
27 | desc: message.desc,
28 | platform: platform
29 | };
30 | })
31 | .then(data => {
32 | return fetch('https://' + FUNCTIONS_SUBDOMAIN + '.cloudfunctions.net/appendRecordToSpreadsheet', {
33 | method: 'POST',
34 | mode: 'cors',
35 | referrer: 'no-referrer',
36 | credentials: 'omit',
37 | cache: 'no-cache',
38 | headers: {
39 | 'Content-Type': 'application/json'
40 | },
41 | body: JSON.stringify(data)
42 | });
43 | })
44 | .then(response => response.text())
45 | }
--------------------------------------------------------------------------------
/extension/browser_style.css:
--------------------------------------------------------------------------------
1 | /* stylelint-disable property-no-vendor-prefix */
2 | /* stylelint-disable property-no-vendor-prefix */
3 |
4 | /* Global */
5 | html,
6 | body {
7 | background: transparent;
8 | box-sizing: border-box;
9 | color: #222426;
10 | cursor: default;
11 | display: flex;
12 | flex-direction: column;
13 | font: caption;
14 | margin: 0;
15 | padding: 0;
16 | -moz-user-select: none;
17 | }
18 |
19 | body * {
20 | box-sizing: border-box;
21 | text-align: start;
22 | }
23 |
24 | .browser-style {
25 | -moz-appearance: none;
26 | margin-bottom: 6px;
27 | text-align: left;
28 | }
29 |
30 | /* stylelint-disable property-no-vendor-prefix */
31 | /* Buttons */
32 | button.browser-style,
33 | select.browser-style {
34 | background-color: #fbfbfb;
35 | border: 1px solid #b1b1b1;
36 | box-shadow: 0 0 0 0 transparent;
37 | font: caption;
38 | height: 24px;
39 | outline: 0 !important;
40 | padding: 0 8px 0;
41 | transition-duration: 250ms;
42 | transition-property: box-shadow, border;
43 | }
44 |
45 | select.browser-style {
46 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==);
47 | background-position: calc(100% - 4px) center;
48 | background-repeat: no-repeat;
49 | padding-inline-end: 24px;
50 | text-overflow: ellipsis;
51 | }
52 |
53 | label.browser-style-label {
54 | font: caption;
55 | }
56 |
57 | button.browser-style::-moz-focus-inner {
58 | border: 0;
59 | outline: 0;
60 | }
61 |
62 | /* Dropdowns */
63 | select.browser-style {
64 | background-color: #fbfbfb;
65 | border: 1px solid #b1b1b1;
66 | box-shadow: 0 0 0 0 transparent;
67 | font: caption;
68 | height: 24px;
69 | outline: 0 !important;
70 | padding: 0 8px 0;
71 | transition-duration: 250ms;
72 | transition-property: box-shadow, border;
73 | }
74 |
75 | select.browser-style {
76 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==);
77 | background-position: calc(100% - 4px) center;
78 | background-repeat: no-repeat;
79 | padding-inline-end: 24px;
80 | text-overflow: ellipsis;
81 | }
82 |
83 | select.browser-style:-moz-focusring {
84 | color: transparent;
85 | text-shadow: 0 0 0 #000;
86 | }
87 |
88 | select.browser-style:-moz-focusring * {
89 | color: #000;
90 | text-shadow: none;
91 | }
92 |
93 | button.browser-style.hover,
94 | select.browser-style.hover {
95 | background-color: #ebebeb;
96 | border: 1px solid #b1b1b1;
97 | }
98 |
99 | button.browser-style.pressed,
100 | select.browser-style.pressed {
101 | background-color: #d4d4d4;
102 | border: 1px solid #858585;
103 | }
104 |
105 | button.browser-style.disabled,
106 | select.browser-style.disabled {
107 | color: #999;
108 | opacity: .5;
109 | }
110 |
111 | button.browser-style.focused,
112 | select.browser-style.focused {
113 | border-color: #fff;
114 | box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
115 | }
116 |
117 | button.browser-style.default {
118 | background-color: #0996f8;
119 | border-color: #0670cc;
120 | color: #fff;
121 | }
122 |
123 | button.browser-style.default.hover {
124 | background-color: #0670cc;
125 | border-color: #005bab;
126 | }
127 |
128 | button.browser-style.default.pressed {
129 | background-color: #005bab;
130 | border-color: #004480;
131 | }
132 |
133 | button.browser-style.default.focused {
134 | border-color: #fff;
135 | }
136 |
137 | /* Radio Buttons */
138 | .browser-style > input[type="radio"] {
139 | display: none;
140 | }
141 |
142 | .browser-style > input[type="radio"] + label {
143 | -moz-user-select: none;
144 | }
145 |
146 | .browser-style > input[type="radio"] + label::before {
147 | background-color: #fff;
148 | background-position: center;
149 | border: 1px solid #b1b1b1;
150 | border-radius: 50%;
151 | content: "";
152 | display: inline-block;
153 | height: 16px;
154 | margin-right: 6px;
155 | vertical-align: text-top;
156 | width: 16px;
157 | }
158 |
159 | .browser-style > input[type="radio"]:hover + label::before,
160 | .browser-style.hover > input[type="radio"]:not(active) + label::before {
161 | background-color: #fbfbfb;
162 | border-color: #b1b1b1;
163 | }
164 |
165 | .browser-style > input[type="radio"]:hover:active + label::before,
166 | .browser-style.pressed > input[type="radio"]:not(active) + label::before {
167 | background-color: #ebebeb;
168 | border-color: #858585;
169 | }
170 |
171 | .browser-style > input[type="radio"]:checked + label::before {
172 | background-color: #0996f8;
173 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iOCIgcj0iNCIgZmlsbD0iI2ZmZiIgLz4KPC9zdmc+Cg==);
174 | border-color: #0670cc;
175 | }
176 |
177 | .browser-style > input[type="radio"]:checked:hover + label::before,
178 | .browser-style.hover > input[type="radio"]:checked:not(active) + label::before {
179 | background-color: #0670cc;
180 | border-color: #005bab;
181 | }
182 |
183 | .browser-style > input[type="radio"]:checked:hover:active + label::before,
184 | .browser-style.pressed > input[type="radio"]:checked:not(active) + label::before {
185 | background-color: #005bab;
186 | border-color: #004480;
187 | }
188 |
189 | .browser-style.disabled > input[type="radio"] + label,
190 | .browser-style.disabled > input[type="radio"]:hover + label,
191 | .browser-style.disabled > input[type="radio"]:hover:active + label {
192 | color: #999;
193 | opacity: .5;
194 | }
195 |
196 | .browser-style.focused > input[type="radio"] + label::before {
197 | border-color: #0996f8;
198 | box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
199 | }
200 |
201 | .browser-style.focused > input[type="radio"]:checked + label::before {
202 | border-color: #fff;
203 | }
204 |
205 | /* Checkboxes */
206 | .browser-style > input[type="checkbox"] {
207 | display: none;
208 | }
209 |
210 | .browser-style > input[type="checkbox"] + label {
211 | -moz-user-select: none;
212 | }
213 |
214 | .browser-style > input[type="checkbox"] + label::before {
215 | background-color: #fff;
216 | background-position: center;
217 | border: 1px solid #b1b1b1;
218 | content: "";
219 | display: inline-block;
220 | height: 16px;
221 | margin-right: 6px;
222 | vertical-align: text-top;
223 | width: 16px;
224 | }
225 |
226 | .browser-style > input[type="checkbox"]:hover + label::before,
227 | .browser-style.hover > input[type="checkbox"]:not(active) + label::before {
228 | background-color: #fbfbfb;
229 | border-color: #b1b1b1;
230 | }
231 |
232 | .browser-style > input[type="checkbox"]:hover:active + label::before,
233 | .browser-style.pressed > input[type="checkbox"]:not(active) + label::before {
234 | background-color: #ebebeb;
235 | border-color: #858585;
236 | }
237 |
238 | .browser-style > input[type="checkbox"]:checked + label::before {
239 | background-color: #0996f8;
240 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNNy43LDEyLjkgQzcuNCwxMy4zIDYuOCwxMy40IDYuNCwxMyBMMy4yLDkuOCBDMi44LDkuNCAyLjgsOC42IDMuMiw4LjIgQzMuNiw3LjggNC40LDcuOCA0LjgsOC4yIEw2LjksMTAuMyBMMTEuMSw0LjQgQzExLjUsMy45IDEyLjIsMy44IDEyLjcsNC4xIEMxMy4yLDQuNSAxMy4zLDUuMiAxMyw1LjcgTDcuNywxMi45IEw3LjcsMTIuOSBaIiBmaWxsPSIjZmZmIiAvPgo8L3N2Zz4K);
241 | border-color: #0670cc;
242 | }
243 |
244 | .browser-style > input[type="checkbox"]:checked:hover + label::before,
245 | .browser-style.hover > input[type="checkbox"]:checked:not(active) + label::before {
246 | background-color: #0670cc;
247 | border-color: #005bab;
248 | }
249 |
250 | .browser-style > input[type="checkbox"]:checked:hover:active + label::before,
251 | .browser-style.pressed > input[type="checkbox"]:checked:not(active) + label::before {
252 | background-color: #005bab;
253 | border-color: #004480;
254 | }
255 |
256 | .browser-style.disabled > input[type="checkbox"] + label,
257 | .browser-style.disabled > input[type="checkbox"]:hover + label,
258 | .browser-style.disabled > input[type="checkbox"]:hover:active + label {
259 | color: #999;
260 | opacity: .5;
261 | }
262 |
263 | .browser-style.focused > input[type="checkbox"] + label::before {
264 | border-color: #0996f8;
265 | box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
266 | }
267 |
268 | .browser-style.focused > input[type="checkbox"]:checked + label::before {
269 | border-color: #fff;
270 | }
271 |
272 | /* Expander Button */
273 | button.browser-style.expander {
274 | background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICA8cGF0aCBkPSJNOCwxMkwzLDcsNCw2bDQsNCw0LTQsMSwxWiIgZmlsbD0iIzZBNkE2QSIgLz4KPC9zdmc+Cg==);
275 | background-position: center;
276 | background-repeat: no-repeat;
277 | height: 24px;
278 | padding: 0;
279 | width: 24px;
280 | }
281 |
282 | /* Interactive States */
283 | button.browser-style:hover:not(.pressed):not(.disabled):not(.focused),
284 | select.browser-style:hover:not(.pressed):not(.disabled):not(.focused) {
285 | background-color: #ebebeb;
286 | border: 1px solid #b1b1b1;
287 | }
288 |
289 | button.browser-style:hover:active:not(.hover):not(.disabled):not(.focused),
290 | select.browser-style:hover:active:not(.hover):not(.disabled):not(.focused) {
291 | background-color: #d4d4d4;
292 | border: 1px solid #858585;
293 | }
294 |
295 | button.browser-style.default:hover:not(.pressed):not(.disabled):not(.focused) {
296 | background-color: #0670cc;
297 | border-color: #005bab;
298 | }
299 |
300 | button.browser-style.default:hover:active:not(.hover):not(.disabled):not(.focused) {
301 | background-color: #005bab;
302 | border-color: #004480;
303 | }
304 |
305 | button.browser-style:focus:not(.disabled) {
306 | border-color: #fff !important;
307 | box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
308 | }
309 |
310 | /* Fields */
311 | .browser-style > input[type="text"],
312 | textarea.browser-style {
313 | background-color: #fff;
314 | border: 1px solid #b1b1b1;
315 | box-shadow: 0 0 0 0 rgba(97, 181, 255, 0);
316 | font: caption;
317 | padding: 0 6px 0;
318 | transition-duration: 250ms;
319 | transition-property: box-shadow;
320 | }
321 |
322 | .browser-style > input[type="text"] {
323 | height: 24px;
324 | }
325 |
326 | .browser-style > input[type="text"].hover,
327 | textarea.browser-style.hover {
328 | border: 1px solid #858585;
329 | }
330 |
331 | .browser-style > input[type="text"].disabled,
332 | textarea.browser-style.disabled {
333 | color: #999;
334 | opacity: .5;
335 | }
336 |
337 | .browser-style > input[type="text"].focused,
338 | textarea.browser-style.focused {
339 | border-color: #0996f8;
340 | box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
341 | }
342 |
343 | /* Interactive States */
344 | .browser-style > input[type="text"]:not(disabled):hover,
345 | textarea.browser-style:not(disabled):hover {
346 | border: 1px solid #858585;
347 | }
348 |
349 | .browser-style > input[type="text"]:focus,
350 | .browser-style > input[type="text"]:focus:hover,
351 | textarea.browser-style:focus,
352 | textarea.browser-style:focus:hover {
353 | border-color: #0996f8;
354 | box-shadow: 0 0 0 2px rgba(97, 181, 255, 0.75);
355 | }
356 |
357 | /* stylelint-disable property-no-vendor-prefix */
358 | .panel-section {
359 | display: flex;
360 | flex-direction: row;
361 | }
362 |
363 | .panel-section-separator {
364 | background-color: rgba(0, 0, 0, 0.15);
365 | min-height: 1px;
366 | }
367 |
368 | /* Panel Section - Header */
369 | .panel-section-header {
370 | border-bottom: 1px solid rgba(0, 0, 0, 0.15);
371 | padding: 16px;
372 | }
373 |
374 | .panel-section-header > .icon-section-header {
375 | background-position: center center;
376 | background-repeat: no-repeat;
377 | height: 32px;
378 | margin-right: 16px;
379 | position: relative;
380 | width: 32px;
381 | }
382 |
383 | .panel-section-header > .text-section-header {
384 | align-self: center;
385 | font-size: 1.385em;
386 | font-weight: lighter;
387 | }
388 |
389 | /* Panel Section - List */
390 | .panel-section-list {
391 | flex-direction: column;
392 | padding: 4px 0;
393 | }
394 |
395 | .panel-list-item {
396 | align-items: center;
397 | display: flex;
398 | flex-direction: row;
399 | height: 24px;
400 | padding: 0 16px;
401 | }
402 |
403 | .panel-list-item:not(.disabled):hover {
404 | background-color: rgba(0, 0, 0, 0.06);
405 | border-bottom: 1px solid rgba(0, 0, 0, 0.1);
406 | border-top: 1px solid rgba(0, 0, 0, 0.1);
407 | }
408 |
409 | .panel-list-item:not(.disabled):hover:active {
410 | background-color: rgba(0, 0, 0, 0.1);
411 | }
412 |
413 | .panel-list-item.disabled {
414 | color: #999;
415 | }
416 |
417 | .panel-list-item > .icon {
418 | flex-grow: 0;
419 | flex-shrink: 0;
420 | }
421 |
422 | .panel-list-item > .text {
423 | flex-grow: 10;
424 | }
425 |
426 | .panel-list-item > .text-shortcut {
427 | color: #808080;
428 | font-family: "Lucida Grande", caption;
429 | font-size: .847em;
430 | justify-content: flex-end;
431 | }
432 |
433 | .panel-section-list .panel-section-separator {
434 | margin: 4px 0;
435 | }
436 |
437 | /* Panel Section - Form Elements */
438 | .panel-section-formElements {
439 | display: flex;
440 | flex-direction: column;
441 | padding: 16px;
442 | }
443 |
444 | .panel-formElements-item {
445 | align-items: center;
446 | display: flex;
447 | flex-direction: row;
448 | margin-bottom: 12px;
449 | }
450 |
451 | .panel-formElements-item:last-child {
452 | margin-bottom: 0;
453 | }
454 |
455 | .panel-formElements-item label {
456 | flex-shrink: 0;
457 | margin-right: 6px;
458 | text-align: right;
459 | }
460 |
461 | .panel-formElements-item input[type="text"],
462 | .panel-formElements-item select.browser-style {
463 | flex-grow: 1;
464 | }
465 |
466 | /* Panel Section - Footer */
467 | .panel-section-footer {
468 | background-color: rgba(0, 0, 0, 0.06);
469 | border-top: 1px solid rgba(0, 0, 0, 0.15);
470 | color: #1a1a1a;
471 | display: flex;
472 | flex-direction: row;
473 | height: 41px;
474 | margin-top: -1px;
475 | padding: 0;
476 | }
477 |
478 | .panel-section-footer-button {
479 | flex: 1 1 auto;
480 | height: 100%;
481 | margin: 0 -1px;
482 | padding: 12px;
483 | text-align: center;
484 | }
485 |
486 | .panel-section-footer-button > .text-shortcut {
487 | color: #808080;
488 | font-family: "Lucida Grande", caption;
489 | font-size: .847em;
490 | }
491 |
492 | .panel-section-footer-button:hover {
493 | background-color: rgba(0, 0, 0, 0.06);
494 | }
495 |
496 | .panel-section-footer-button:hover:active {
497 | background-color: rgba(0, 0, 0, 0.1);
498 | }
499 |
500 | .panel-section-footer-button.default {
501 | background-color: #0996f8;
502 | box-shadow: 0 1px 0 #0670cc inset;
503 | color: #fff;
504 | }
505 |
506 | .panel-section-footer-button.default:hover {
507 | background-color: #0670cc;
508 | box-shadow: 0 1px 0 #005bab inset;
509 | }
510 |
511 | .panel-section-footer-button.default:hover:active {
512 | background-color: #005bab;
513 | box-shadow: 0 1px 0 #004480 inset;
514 | }
515 |
516 | .panel-section-footer-separator {
517 | background-color: rgba(0, 0, 0, 0.1);
518 | width: 1px;
519 | z-index: 99;
520 | }
521 |
522 | /* Panel Section - Tabs */
523 | .panel-section-tabs {
524 | color: #1a1a1a;
525 | display: flex;
526 | flex-direction: row;
527 | height: 41px;
528 | margin-bottom: -1px;
529 | padding: 0;
530 | }
531 |
532 | .panel-section-tabs-button {
533 | flex: 1 1 auto;
534 | height: 100%;
535 | margin: 0 -1px;
536 | padding: 12px;
537 | text-align: center;
538 | }
539 |
540 | .panel-section-tabs-button:hover {
541 | background-color: rgba(0, 0, 0, 0.06);
542 | }
543 |
544 | .panel-section-tabs-button:hover:active {
545 | background-color: rgba(0, 0, 0, 0.1);
546 | }
547 |
548 | .panel-section-tabs-button.select.browser-styleed {
549 | box-shadow: 0 -1px 0 #0670cc inset, 0 -4px 0 #0996f8 inset;
550 | color: #0996f8;
551 | }
552 |
553 | .panel-section-tabs-button.select.browser-styleed:hover {
554 | color: #0670cc;
555 | }
556 |
557 | .panel-section-tabs-separator {
558 | background-color: rgba(0, 0, 0, 0.1);
559 | width: 1px;
560 | z-index: 99;
561 | }
562 |
--------------------------------------------------------------------------------
/extension/icons/icon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-128.png
--------------------------------------------------------------------------------
/extension/icons/icon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-16.png
--------------------------------------------------------------------------------
/extension/icons/icon-19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-19.png
--------------------------------------------------------------------------------
/extension/icons/icon-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-24.png
--------------------------------------------------------------------------------
/extension/icons/icon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-32.png
--------------------------------------------------------------------------------
/extension/icons/icon-38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-38.png
--------------------------------------------------------------------------------
/extension/icons/icon-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ehsan/popup-reporter/36fa6e29f8f79d22d2ccb143c2e0a6f62e7897e3/extension/icons/icon-64.png
--------------------------------------------------------------------------------
/extension/icons/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
49 |
--------------------------------------------------------------------------------
/extension/manifest.chrome.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "In-Page Pop-up Reporter",
4 | "version": "1.6",
5 |
6 | "description": "Help curate a data set of pages that open in-page pop-ups by reporting the URLs of such pages as you encounter them.",
7 | "homepage_url": "https://github.com/ehsan/popup-reporter",
8 | "icons": {
9 | "16": "icons/icon-16.png",
10 | "24": "icons/icon-24.png",
11 | "32": "icons/icon-32.png",
12 | "64": "icons/icon-64.png",
13 | "128": "icons/icon-128.png"
14 | },
15 |
16 | "permissions": [
17 | "activeTab",
18 | "tabs"
19 | ],
20 |
21 | "browser_action": {
22 | "default_icon": "icons/icon-64.png",
23 | "default_title": "In-Page Pop-up Reporter",
24 | "default_popup": "page/report.html"
25 | },
26 |
27 | "background": {
28 | "scripts": ["background.js"]
29 | },
30 |
31 | "options_ui": {
32 | "page": "options_ui/options.html"
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/extension/manifest.firefox.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "In-Page Pop-up Reporter",
4 | "version": "1.6",
5 |
6 | "description": "Help curate a data set of pages that open in-page pop-ups by reporting the URLs of such pages as you encounter them.",
7 | "homepage_url": "https://github.com/ehsan/popup-reporter",
8 | "icons": {
9 | "16": "icons/icon.svg",
10 | "24": "icons/icon.svg",
11 | "32": "icons/icon.svg",
12 | "64": "icons/icon.svg",
13 | "128": "icons/icon.svg"
14 | },
15 |
16 | "permissions": [
17 | "activeTab",
18 | "tabs"
19 | ],
20 |
21 | "page_action": {
22 | "browser_style": true,
23 | "default_icon": {
24 | "16": "icons/icon.svg",
25 | "19": "icons/icon.svg",
26 | "24": "icons/icon.svg",
27 | "32": "icons/icon.svg",
28 | "38": "icons/icon.svg",
29 | "64": "icons/icon.svg",
30 | "128": "icons/icon.svg"
31 | },
32 | "default_title": "In-Page Pop-up Reporter",
33 | "default_popup": "page/report.html",
34 | "show_matches": [""]
35 | },
36 |
37 | "background": {
38 | "scripts": ["background.js"]
39 | },
40 |
41 | "options_ui": {
42 | "browser_style": true,
43 | "page": "options_ui/options.html"
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/extension/options_ui/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | In-Page Popup Reporter
7 |
8 |
9 |
14 | Firefox is experimenting with a popup blocker to
15 | automatically dismiss in-page popups and overlays.
16 | Help us create a dataset by reporting any pages that
17 | show annoying pop-ups.