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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.chart div { | |
font: 10px sans-serif; | |
background-color: blue; | |
text-align: right; | |
padding: 3px; | |
margin: 1px; |
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
{ | |
"name": "ChromeToPocket", | |
"short_name": "ChromeToPocket", | |
"description": "Import your chrome bookamrks to Pocket", | |
"version": "0.1", | |
"manifest_version": 2, | |
"browser_action": { | |
"default_icon": "import.png", | |
"default_popup": "popup.html" | |
}, |
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
var __request_code; | |
var __access_token_string; | |
function process_bookmarks ( bookmarks ) { | |
document.getElementById("progress-icon").innerHTML = "<img height='50px' width='50px' src='spinner-uploading.gif'></img>" | |
document.getElementById("progress-text").innerHTML = "Uploadig bookmarks to Pocket" | |
console.log("Beginning import...") | |
for ( var i =0; i < bookmarks.length; i++ ) { | |
var bookmark = bookmarks[i]; | |
if ( bookmark.url ) { |
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
<html> | |
<head> | |
<title>ChromeToPocket</title> | |
<script src="import.js"></script> | |
<style> | |
* { | |
margin: 5; | |
padding: 5; | |
} | |
html, body { |
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
App.directive('uiSrefIf', function($compile) { | |
return { | |
link: function($scope, $element, $attrs) { | |
var uiSrefVal = $attrs.uiSrefVal, | |
uiSrefIf = $attrs.uiSrefIf; | |
$element.removeAttr('ui-sref-if'); | |
$element.removeAttr('ui-sref-val'); | |
$scope.$watch( |
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
git-create(){ | |
repo_name=$1 | |
dir_name=`basename $(pwd)` | |
if [ "$repo_name" = "" ]; then | |
echo -n "Repo name [$dir_name]?: " | |
read repo_name | |
fi | |
if [ "$repo_name" = "" ]; then |
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
{ | |
"manifest_version": 2, | |
"name": "YTPP", | |
"short_name": "YTPP", | |
"version": "0.1", | |
"description": "YTPP: YouTube Play/Pause without switching tabs", | |
"icons": {"128": "icon.png", "48": "icon_48.png", "16": "icon_16.png" }, | |
"author": {"name": "spidergears", "twitter_handle": "spider_gears", "github": "http://github.com/spidergears"}, | |
"browser_action": { "default_icon": "icon.png", "default_title": "YTPP"}, |
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
chrome.browserAction.onClicked.addListener(function(tab) { | |
chrome.tabs.query({}, function(tabs){ | |
for (var i=0; i < tabs.length; i++) { | |
if (/https?:\/\/www\.youtube\.com/.test(tabs[i].url)) { | |
chrome.tabs.sendMessage(tabs[i].id, {action: "toggle_playback"}, function(response) {}); | |
} | |
} | |
}) | |
}); |
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
chrome.extension.onMessage.addListener(function(message, sender, sendResponse) { | |
if(message.action == "toggle_playback"){ | |
play_pause_button = document.getElementsByClassName('ytp-play-button ytp-button')[0] | |
if(play_pause_button){ | |
play_pause_button.click(); | |
} | |
} | |
}); |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.myapp"> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> | |
<application ...> | |
... | |
</application> |