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 Share = {}; | |
Share.fb = function (link, title, sumary, image, winWidth, winHeight) { | |
var shareUrl = 'https://www.facebook.com/dialog/feed?'; | |
shareUrl += 'app_id=141676832590601'; | |
shareUrl += '&link=' + encodeURIComponent(link); | |
shareUrl += '&picture=' + encodeURIComponent(image); | |
shareUrl += '&name=' + title; | |
shareUrl += '&caption=' + ""; | |
shareUrl += '&description=' + sumary; |
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="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello FB</title> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<div id="fb-content"></div> | |
<div> |
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
/////////////////////////////////////////////////////////////////////////////////// | |
/// Colection of RGB to HSB, HSB to RGB convert functions | |
/// Source: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb | |
/////////////////////////////////////////////////////////////////////////////////// | |
/** | |
* componentToHex convert two digit htx value to R, G or B chanel value | |
* @param number c value from 0 to 225 | |
* @return string value of R, G or B chanel | |
* @usage //alert (componentToHex(255)); //ff |
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
// Include Color Thief Script | |
// https://github.com/lokesh/color-thief | |
function colorChange(){ | |
//Be sure to include <img id="coverImage" src="" alt=""/> | |
var $myImage = $("#coverImage"); | |
var colorThief = new ColorThief(); | |
//Grabs 8 swatch color palette from image and sets quality to 5 (0 =slow, 10=default/fast) | |
var cp = colorThief.getPalette($myImage[0], 8, 5); |
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
(function(){ //Self executing, anonymous function | |
//Leave out above if including in already existing script | |
function Swipe(){ | |
var firstX, lastX; | |
function swipeRight(){ | |
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 | |
// http://25labs.com/alternative-for-file_get_contents-using-curl/ | |
function file_get_contents_curl($url, $retries=5) | |
{ | |
$ua = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'; | |
if (extension_loaded('curl') === true) | |
{ |
NewerOlder