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 metaSet(metaName,setValue){ | |
var metalist = document.getElementsByTagName('meta'); | |
var metaNoExist = true; | |
for(var i = 0; i < metalist.length; i++) { | |
var name = metalist[i].getAttribute('name'); | |
if(name && name.toLowerCase() === metaName) { | |
metalist[i].setAttribute('content',setValue); | |
metaNoExist = false; | |
break; | |
} |
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 getQueryString() { | |
var result = {}; | |
if (1 < window.location.search.length) { | |
var query = window.location.search.substring(1); | |
var parameters = query.split('&'); | |
for (var i = 0; i < parameters.length; i++) { | |
var element = parameters[i].split('='); | |
var paramName = decodeURIComponent(element[0]); | |
var paramValue = decodeURIComponent(element[1]); | |
result[paramName] = paramValue; |
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
/*! | |
* Paper.js v0.9.18 - The Swiss Army Knife of Vector Graphics Scripting. | |
* http://paperjs.org/ | |
* | |
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey | |
* http://scratchdisk.com/ & http://jonathanpuckey.com/ | |
* | |
* Distributed under the MIT license. See LICENSE file for details. | |
* | |
* All rights reserved. |
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
module.exports = do -> | |
ua = window.navigator.userAgent.toUpperCase() | |
if (ua.match /IPOD/) or (ua.match /IPHONE/) or (ua.match /IPAD/) | |
if (ua.match /TWITTER/) or (ua.match /LINE/) or (ua.match /FBCR/) | |
return false | |
else | |
return true | |
else | |
return true |
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 | |
header("Content-type: application/x-javascript"); | |
header("Access-Control-Allow-Origin:*"); | |
$ip_address = $_SERVER['REMOTE_ADDR']; | |
echo "var ipAddress = '" . $ip_address . "';"; | |
?> |
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
<!--LINE ref検知--> | |
<script> | |
//URLの文字列を取得 | |
function getQueryString(){ | |
var result = {}; | |
if( 1 < window.location.search.length ){ | |
var query = window.location.search.substring( 1 ); | |
var parameters = query.split( '&' ); | |
for( var i = 0; i < parameters.length; i++ ){ | |
var element = parameters[ i ].split( '=' ); |
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 familyname = "もじれつ"; | |
/** | |
* 入力が許容された文字列かチェック | |
*/ | |
var oklist = []; | |
$.each( familyname.split(''), function( i, value ){ | |
var checked = inputValid( value ); | |
if( checked ){ |
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
javascript: (function() { | |
javascript: (function(d, j, b, s) { | |
function r() { | |
setTimeout(function() { | |
(typeof jQuery == 'undefined') ? r(): b(jQuery) | |
}, 99) | |
}(j) ? b(jQuery): d.body.appendChild(d.createElement('script')).src = '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', r() | |
})(document, this.jQuery, function($) { | |
var ogurl = $("meta[property='og:url']").attr("content"); | |
var ogtitle = $("meta[property='og:title']").attr("content"); |
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
$("#js-scrollBtn").on("click", function() { | |
$("html, body").stop().animate({ | |
scrollTop: $("#js-scrollTarget").offset().top + "px" | |
}, 500); | |
}); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer