Skip to content

Instantly share code, notes, and snippets.

@jaydson
jaydson / gist:1780598
Created February 9, 2012 15:11
How to detect a click event on a cross domain iframe
var myConfObj = {
iframeMouseOver : false
}
window.addEventListener('blur',function(){
if(myConfObj.iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){
@BrockA
BrockA / checkForBadJavascripts.js
Created May 6, 2012 06:11
This is a utility function, meant to be used inside a Greasemonkey script that has the "@run-at document-start" directive set. It Checks for and deletes or replaces specific <script> tags.
/*--- checkForBadJavascripts()
This is a utility function, meant to be used inside a Greasemonkey script that
has the "@run-at document-start" directive set.
It Checks for and deletes or replaces specific <script> tags.
*/
function checkForBadJavascripts (controlArray) {
/*--- Note that this is a self-initializing function. The controlArray
parameter is only active for the FIRST call. After that, it is an
event listener.
@arantius
arantius / grant-none-shim.js
Last active May 21, 2022 14:47
Greasemonkey "@grant none" compatibility shim.
/*
The MIT License (MIT)
Copyright (c) 2014 Anthony Lieuallen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
[{"key":"1920 x 1080","name":"Nexus 5 Landscape","width":1920,"height":1080},
{"key":"1080 x 1920","name":"Nexus 5 Portrait","width":1080,"height":1920},
{"key":"1024 x 768","name":"iPad Landscape","width":1024,"height":768},
{"key":"768 x 1024","name":"iPad Portrait","width":768,"height":1024},
{"key":"736 x 414","name":"iPhone 6 Plus Landscape","width":736,"height":414},
{"key":"414 x 736","name":"iPhone 6 Plus Portrait","width":414,"height":736},
{"key":"667 x 375","name":"iPhone 6 Landscape","width":667,"height":375},
{"key":"375 x 667","name":"iPhone 6 Portrait","width":375,"height":667},
{"key":"568 x 320","name":"iPhone 5/S/C Landscape","width":568,"height":320},
{"key":"320 x 568","name":"iPhone 5/S/C Portrait","width":320,"height":568},
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<link href="http://www.flashls.org/videojs/video-js.css" rel="stylesheet" type="text/css">
<script src="http://www.flashls.org/videojs/video.js"></script>
<script>
videojs.options.flash.swf = "http://www.flashls.org/videojs/video-js.swf";
</script>
</head>
@tommyh
tommyh / hls_capleveltostage_default.html
Created August 5, 2015 17:37
Videojs: flashls: capleveltostage default
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<link href="http://www.flashls.org/videojs/video-js.css" rel="stylesheet" type="text/css">
<script src="http://www.flashls.org/videojs/video.js"></script>
<script>
videojs.options.flash.swf = "http://tout-development.site.s3.amazonaws.com/tomhallettest/video-js-mangui-dist.swf";
</script>
</head>
@xvitaly
xvitaly / remove_crw.cmd
Last active March 16, 2024 16:12
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
@0-oo
0-oo / google_search_date_limiter.user.js
Last active November 12, 2019 01:32
Greasemonkey/Tampermonkey: Add the date-range selector on Google Search.
// ==UserScript==
// @name Google Search Date Limiter
// @namespace http://0-oo.net/
// @description Add the date-range selector on Google Search.
// @homepage http://0-oo.net/log/category/javascript/google-search-date-limiter/
// @version 0.9.0
// @include http*://www.google.tld/search*
// @include http*://www.google.tld/webhp*
// @include http*://www.google.tld/imghp
// @include http*://www.google.tld/ig*
#!/usr/bin/env bash
# Wayback machine downloader
#TODO: Remove redundancy (download only newest files in given time period - not all of them and then write over them)
############################
clear
#Enter domain without http:// and www.
domain="google.com"
#Set matchType to "prefix" if you have multiple subdomains, or "exact" if you want only one page
matchType="domain"
@hyOzd
hyOzd / unfix-all-the-toolbars.user.js
Last active July 31, 2021 12:43 — forked from vbuaraujo/unfix-all-the-toolbars.user.js
GreaseMonkey script to remove "position: fixed" from webpages
// ==UserScript==
// @name unfix-all-the-toolbars
// @description Removes "position: fixed" style from elements, unfixing "toolbars" and the such.
// @namespace https://hasanyavuz.ozderya.net
// @include *
// @version 1
// @grant none
// ==/UserScript==