View .babelrc
{
"presets": ["es2015"]
}
View bower.json
{
"name": "dev_setting",
"private": true,
"dependencies": {
"bootstrap": "3.3.6",
"jquery": "2.2.0",
"jquery-validation": "1.14.0",
"jquery-validation-unobtrusive": "3.2.5",
"knockout": "3.4.0",
"linqjs": "3.0.5",
View spResize.js
function spResize(){
$(window).on("resize", function(){
$("html").css("zoom" , $(window).width()/320 );
}).trigger("resize");
}
View 01mail.php
<?php
ini_set('display_errors', 0);
session_start();
//トークンを生成
$token = sha1(uniqid(mt_rand(), true));
$_SESSION['token'] = $token;
//エスケープ
View get_form_str_length.js
/**
* [namespace]
*/
var App = App || {};
/**
* [Model]
*/
App.Model = function(text){
this.text = text;
View error.js
function TextCount(){
this.textArea = document.getElementById('textArea');
this.textCount = document.getElementById('textCount');
this.init();
}
TextCount.prototype = {
init: function(){
var that = this;
View OpenGraph.html
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja" dir="ltr" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<meta property="og:title" content="記事のタイトル" />
<meta property="og:type" content="article" /> <!-- トップページはwebsite、個別ページはarticle -->
<meta property="og:description" content="記事の説明" />
<meta property="og:url" content="記事のURL" />
<meta property="og:image" content="画像のURL" />
<meta property="og:site_name" content="サイトのタイトル" />
<meta property="og:locale" content="言語" />
<meta property="fb:admins" content="facebookのユーザーID" />
View hasElement.js
/**
* @param {String} selector 判定する要素
* @return {Boolean}
*/
function hasElement(selector){
var el = document.querySelector(selector);
if(el !== null){
return true;
}
return false;
View jquery.showElementOnScroll.js
/**
* 特定の位置で対象を表示する
* @param {String} el 対象のセレクター ※必須
* @param {Number} position 特定の位置 ※必須
*/
function ShowElementOnScroll(el,position){
this.$el = $(el);
this.position = position;
this.$window = $(window);
this.event();
View inherits.js
//inherits
function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}