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
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { | |
(async () => { | |
const { action } = request; | |
const { tab } = sender; | |
// Get global value(s) from main frame | |
if (action === 'get-datalayer') { | |
const injectionResults = await chrome.scripting.executeScript({ | |
target: { tabId: tab.id }, | |
func: () => window.dataLayer, |
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
#!/bin/bash | |
# Toggle Private Internet Access VPN | |
# https://gist.github.com/jhildenbiddle/f910555cc32114e7b4c30f862a00ec60 | |
# | |
# Requires installation of PIA app | |
# https://www.privateinternetaccess.com/pages/download | |
# Set path to piactl (use `which piactl` to determine) | |
piactl="/usr/local/bin/piactl" |