Skip to content

Instantly share code, notes, and snippets.

View kewisch's full-sized avatar

Philipp Kewisch kewisch

View GitHub Profile
@kewisch
kewisch / background.js
Created August 31, 2020 11:41
Proof of Concept: Google OAuth2 without the browser.identity API
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* Portions Copyright (C) Philipp Kewisch, 2020 */
class OAuth2 {
AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth"
APPROVAL_URL = "https://accounts.google.com/o/oauth2/approval/v2"
TOKEN_URL = "https://oauth2.googleapis.com/token"
LOGOUT_URL = "https://oauth2.googleapis.com/revoke"
/**
* Tests the calICalendarManager interface
*/
function run_test() {
do_calendar_startup(run_next_test);
}
class CalendarManagerObserver {
QueryInterface = ChromeUtils.generateQI(["calICalendarManager"])
@kewisch
kewisch / TracedRequest.js
Created October 2, 2014 14:20
Monitor all http(s) network requests using the Mozilla Platform
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var allRequests = [];
/**
* Add the following function as a request observer:
* Services.obs.addObserver(httpObserver, "http-on-examine-response", false);
*

Keybase proof

I hereby claim:

  • I am kewisch on github.
  • I am kewisch (https://keybase.io/kewisch) on keybase.
  • I have a public key whose fingerprint is 0D0F FC55 AF6C 1336 9C05 1006 2090 4A84 FE62 C357

To claim this, I am signing this object:

// Post parser
// COMPONENT OR STRING
//SAX?
var builder = ICAL.Builder({ /* options */ });
builder.onitem = function() {
};