Skip to content

Instantly share code, notes, and snippets.

@patik
patik / alpha-app-net-enhanced.user.js
Created August 30, 2012 22:20
Alpha.App.Net Enhanced
// @name Enhanced Alpha.App.Net
// @description Image previews, Repost links, and Twitter character count on Alpha.App.Net
// @namespace http://patik.com/code/user-scripts/
// @include https://alpha.app.net/*
// @version v20120903.1
// ==/UserScript==
(function _adnenhance_init(win) {
var adnenh = {};
@patik
patik / twitter-avatar-in-menu.user.js
Last active October 1, 2015 17:18
Twitter Avatar in Menu
// ==UserScript==
// @name Twitter Avatar in Menu
// @namespace http://patik.com/code/user-scripts/
// @include https://twitter.com/*
// @include http://twitter.com/*
// @version 2.1.20131118
// ==/UserScript==
(function _twitter_avatar_in_menu() {
// Find the generic 'person' outline in the nav bar, which will be replaced
@patik
patik / scrollToHash.user.js
Last active September 28, 2015 21:28
Scroll to the heading that matches the URL hash
// ==UserScript==
// @name Scroll To Heading From Hash
// @author Craig Patik
// @namespace http://github.com/cpatik
// @version 1.0
// @description Enable jumping to any heading without adding IDs to the heading elements
// @include http://*
// ==/UserScript==
// Site owners can drop the code below into their pages,
@patik
patik / custom.selector.test.html
Created December 10, 2011 22:16
Customized Zepto for fake selectors
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<style> .hidden { display: none; } </style>
<script src="zepto.custom.js"></script>
<script>
$(document).ready(function(e) {
// This should print 2 results: #div3 and #div4
console.log("visible:", $("div:visible"));
@patik
patik / jQueryMobile Blackberry 6 collapsible content bug
Created February 10, 2011 21:09
On a Blackberry Bold 9650 running OS 6, collapsible elements do not expand/collapse properly. This workaround adds an event listener with a `setTimeout` of zero milliseconds.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>BB6 Collapsible</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css">
<script src="http://code.jquery.com/jquery-1.5.min.js"></script>
<script>
$(document).ready(function() {
if (/blackberry/i.test(navigator.platform)) {