This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
This file contains 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
if (window.location.origin !== "https://www.instagram.com") { | |
window.alert( | |
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.", | |
); | |
window.location.href = "https://www.instagram.com"; | |
console.clear(); | |
} | |
const fetchOptions = { | |
credentials: "include", |
This file contains 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
// | |
// serviceWorkerService.js | |
// | |
'use strict'; | |
angular.module('myApp.serviceWorker', []) | |
.service('serviceWorkerService', ['$q', '$http', '$location', '$timeout', | |
function($q, $http, $location, $timeout) { | |
var noTokenError = new Error('No Instance ID token available'); | |
var noPermissionError = new Error('Unable to get permission to notify'); |