Skip to content

Instantly share code, notes, and snippets.

View RayBB's full-sized avatar

Raymond Berger RayBB

View GitHub Profile
@miraries
miraries / userscript.js
Created March 23, 2020 02:24
Zoom redirector
// ==UserScript==
// @name Zoom web redirect
// @match *://*.zoom.us/j/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const match = /^\/j\/(\d+)\/?$/.exec(location.pathname);
@rmogstad
rmogstad / gist:a70efda59a78d99f9153201e09bc8009
Last active December 28, 2016 03:28
Load all Reddit comments
$( ".report-button" ).after('<li><a href="#" onclick="loadNextComment();">load all comments</a></li>')
loadNextComment = function() { commentLink=document.querySelectorAll("span[class=morecomments] a")[0]; if( commentLink != undefined) { commentLink.click(); setTimeout(function() { loadNextComment() }, 1000); } else { alert('All comments loaded!');} };
@lorenjohnson
lorenjohnson / chrome-autoscroll-bookmarklet.js
Created June 12, 2016 17:09
Auto Scroll Bookmarklet (for Chrome)
javascript:(function(window, document) {
var isScrolling, scrollTimeout;
var defaultScrollSpeed = 50;
var scrollSpeed = 50;
var adjustIncrement = 2;
var jumpIncrement = 50;
function start() {
window.addEventListener('keydown', keyPressed);
window.addEventListener('keyup', keyReleased, false);
@liaohuqiu
liaohuqiu / gist:4ee77b9b03afcdecc80252252378d367
Created June 9, 2016 00:38
Find out the full duration time of a YouTube playlist
var list = document.getElementsByClassName('pl-video-time');
var time = 0;
function toS(hms) {
var a = hms.split(':');
while (a.length < 3) {
a.unshift(0);
}
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
return seconds;
@prashanthrajagopal
prashanthrajagopal / get_url.scpt
Last active June 29, 2024 05:33
AppleScript to get url from Safari, Firefox and Chrome
display dialog "Name of the browser?" default answer "Safari"
set inp to text returned of result
tell application "System Events"
if inp is "Google Chrome" then
tell application "Google Chrome" to return URL of active tab of front window
else if inp is "Safari" then
tell application "Safari" to return URL of front document
else if inp is "Firefox" then
tell application "Firefox" to activate