This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var microsecondsPerWeek = 1000 * 60 * 60 * 24 * 7; | |
| var searchEpoch = microsecondsPerWeek * 52; | |
| var oneYearAgo = (new Date).getTime() - searchEpoch; | |
| // Chrome history API does not yet support promises, only callback | |
| // So, wrap the chrome.history.search in a promise of our own | |
| function chromeHistorySearchAsync() { | |
| console.log("beginning query"); | |
| return new Promise(function(resolve, reject) { | |
| console.log("inside promise"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addEventListener('fetch', event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| async function handleRequest(request) { | |
| const url = new URL(request.url) | |
| const path = request.url.replace(/^https:\/\/[^\/]*\//, '') | |
| const apiUrl = "https://example.com/" + path | |
| request = new Request(apiUrl, request) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| background-color: black !important; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To repeat: | |
| // - Create an empty android activity project for Kotlin | |
| // - Add the following class and *POOF* go look at top | |
| package com.example.android.myapplication | |
| import android.util.Log | |
| import android.view.MotionEvent | |
| import android.view.View |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package au.id.alexn; | |
| import android.content.Context; | |
| import android.util.AttributeSet; | |
| import android.util.Log; | |
| import android.view.MotionEvent; | |
| import android.view.ScaleGestureDetector; | |
| import android.view.View; | |
| import android.widget.FrameLayout; |
