Skip to content

Instantly share code, notes, and snippets.

View slothentic's full-sized avatar

Slothin' it up slothentic

View GitHub Profile
Simply add this to your settings on uBlock origin, remove the huge Covid 19 notice on YouTube desktop
youtube.com###clarify-box
<?php
use net\authorize\api\contract\v1 as AnetAPI;
use net\authorize\api\controller as AnetController;
$acceptJsCode = $this->request->get('code');
$apiLoginId = "xxxx";
$transactionKey = "xxx";
$environmentHandle = \net\authorize\api\constants\ANetEnvironment::PRODUCTION;
// Adapted from: https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html
// After scouring the internet, this is the only workable example I found
// The File object returned from resolveLocalFileSystemURL().file() is not compatible with FormData
navigator.camera.getPicture(function cameraSuccess(imageUri) {
window.resolveLocalFileSystemURL(imageUri, function(fileEntry) {
fileEntry.file(function(file) {
// imageUri - this can be used to display an image like `<img src=${imageUri} />`
// file - a "File" type, but not a normal File type that can be used with FormData