Skip to content

Instantly share code, notes, and snippets.

View thePaulV's full-sized avatar

Paul V thePaulV

  • Toronto
View GitHub Profile
@thePaulV
thePaulV / trigger-most-recent-tab.js
Created November 16, 2017 03:01
Trigger Most Recent Tab addon for Firefox action programmatically from another addon
/* 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/. */
"use strict";
// ID of Most Recent Tab addon
const extensionId = 'jid0-LWzdpvwYVlFi9mYfHgWxSB6aFEY@jetpack';
// Any message, ignored by Most Recent Tab
@thePaulV
thePaulV / Count hashtags.js
Last active April 20, 2017 03:03
A short Automator script to teach one's Mac how to count hashtags in a block of text. It'll probably work. https://opensource.org/licenses/MIT
/** Given a block of text, count the number of hashtags.
Script for Automator on macOS. Add as a "Run JavaScript" block in an Service. Service receives selected 'text' in 'any application'. Uncheck 'Output replaced selected text.'
To use, go to the app name in the menu bar, select Services, then the name you gave the service in Automator.
@author Paul Vet. Github: @thePaulV
@license https://opensource.org/licenses/MIT
*/
function run(input, parameters) {