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
function createChart() { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
// Get the last row with content | |
var lastRow = sheet.getLastRow(); | |
// Get data range | |
var dataRange = sheet.getRange('A2:B' + lastRow); | |
var data = dataRange.getValues(); |
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
let l = window.location; | |
const p = new URLSearchParams(l.search); | |
p.set('hl','en'); | |
window.location.search="?"+p.toString(); | |
//minified bookmarklet code | |
//javascript:let l=window.location,p=new URLSearchParams(l.search);p.set("hl","en");window.location.search="?"+p.toString(); |
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
// ==UserScript== | |
// @name shows important SEO head information | |
// @namespace http://www.facesaerch.com/ | |
// @description show canonical, noindex, nofollow | |
// @include * | |
// ==/UserScript== | |
function trim12 (str) { | |
var str = str.replace(/^\s\s*/, ''), | |
ws = /\s/, |
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
$( '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. |
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
// Safe to say...textarea is a good idea: <textarea id="pasteField"></textarea> | |
$( '#pasteField' ).on( 'paste', function( evt ) { | |
// Safari has a weird "types" list that we need to loop through and no "items" array. | |
var i = 0, items = [], item, key = 'text/plain', kind = 'string'; | |
while (i < evt.originalEvent.clipboardData.types.length) { | |
var key = evt.originalEvent.clipboardData.types[i]; | |
if( !key.match( /(text\/)|(plain-text)/i ) ) { | |
kind = 'file'; | |
} |
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
// We need a textarea for IE, too: <textarea id="pasteField"></textarea> | |
$( '#pasteField' ).bind( 'paste', function( evt ) { | |
// In true Microsoft form, the type to get plain text is Text with a captial T. | |
console.log( window.clipboardData.getData( 'Text' ) ); | |
} ); |
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
<textarea id="pasteField"></textarea> |
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
$( '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. |
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
/** | |
* JSONP implementation of the bit.ly API for dynamic | |
* URL shortening | |
* | |
* @author = "Kai Mallea ([email protected])" | |
* | |
* TODO: Add domain param to choose between bit.ly and j.mp | |
*/ | |