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
d = function(msg) { console.log(msg); } | |
var _css_path_to_autocomplete_ = '#gsr > div.gstl_0.sbdd_a > div:nth-child(2) > div.sbdd_b > div > ul'; | |
var _css_path_to_recommendations_ = '._e4b'; _css_path_to_autocomplete_;//'#brs > div > div:nth-child(1) > p:nth-child(1) > a';//'#brs';//'._e4b'; | |
A = [] | |
var arrayUnique = function(a) { | |
return a.reduce(function(p, c) { | |
if (p.indexOf(c) < 0) p.push(c); |
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
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
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
$( 'body' ).bind( 'paste', function( evt ) { | |
var items = evt.originalEvent.clipboardData.items | |
, paste; | |
// Items have a "kind" (string, file) and a MIME type | |
console.log( 'First item "kind":', items[0].kind ); | |
console.log( 'First item MIME type:', items[0].type ); | |
// If a user pastes image data, there are 2 items: the file name (at index 0) and the file (at index 1) | |
// but if the user pastes plain text or HTML, index 0 is the data with markup and index 1 is the plain, unadorned text. |