This is now an actual repo:
This file contains 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
/* | |
_.move - takes array and moves item at index and moves to another index; great for use with jQuery.sortable() | |
*/ | |
_.mixin({ | |
move: function (array, fromIndex, toIndex) { | |
array.splice(toIndex, 0, array.splice(fromIndex, 1)[0] ); | |
return array; | |
} | |
This file contains 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
// https://gist.github.com/854622 | |
(function(window,undefined){ | |
// Prepare our Variables | |
var | |
History = window.History, | |
$ = window.jQuery, | |
document = window.document; | |
// Check to see if History.js is enabled for our Browser |
This file contains 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="insertTest"></div> | |
<script> | |
var wikipediaHTMLResult = function(data) { | |
var readData = $('<div>' + data.parse.text.* + '</div>'); | |
// handle redirects | |
var redirect = readData.find('li:contains("REDIRECT") a').text(); | |
if(redirect != '') { | |
callWikipediaAPI(redirect); |