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
<!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)) { |
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
<!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")); |
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
// ==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, |
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
// @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 = {}; |
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
<div id="alpha-toolbar"><!-- Toolbar commands here --></div> | |
<textarea id="alpha"></textarea> | |
<div id="bravo-toolbar"><!-- Toolbar commands here --></div> | |
<textarea id="bravo"></textarea> | |
<div id="charlie-toolbar"><!-- Toolbar commands here --></div> | |
<textarea id="charlie"></textarea> |
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
<?php | |
require_once('keys.php'); // Where my constants are defined | |
require_once('AppDotNet.php'); | |
$clientId = ADN_CLIENT_ID; | |
$clientSecret = ADN_CLIENT_SECRET; | |
$redirectUri = ADN_REDIRECT_URI; | |
# User has authorized: | |
if (isset($_GET['code']) && !empty($_GET['code'])) { |
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
// @name Redirect from WikiTravel to WikiVoyage | |
// @description Automatically switch from a WikiTravel.org article to the same article on WikiVoyage.org | |
// @namespace http://patik.com/code/user-scripts/ | |
// @include http://wikitravel.org/* | |
// @version v20130218.1 | |
// ==/UserScript== | |
(function _wikivoyage_redir (win) { | |
// Example | |
// Before: http://wikitravel.org/en/Bangkok/Sukhumvit |
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
var insertAfterEveryFromRight = function _insertAfterEveryFromRight(str, insert, every) { | |
var result = ''; | |
str.split('').reverse().forEach(function(s, idx) { | |
if (idx !== 0 && idx % every === 0) { | |
result += insert; | |
} | |
result += s; | |
}); | |
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
.expandable { | |
transition-property: none; | |
transition-duration: .5s; | |
transition-timing-function: ease-in-out; | |
} | |
/* Vary the transition with different classes */ | |
.expandable.molasses { | |
transition-duration: 3s; | |
} |
OlderNewer