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": "product_name", | |
"version": "1.0.0", | |
"description": "", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build": "webpack --progress --colors --watch --mode production", | |
"dev": "webpack && webpack-dev-server --progress --colors --config webpack.config.js" | |
}, | |
"author": "annalia.hsiao", |
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
const webpackMerge = require('webpack-merge'); | |
const commonConfig = require('./webpack.common.js'); | |
module.exports = webpackMerge(commonConfig, { | |
mode: 'production', | |
optimization: { | |
minimize: false, | |
runtimeChunk: { | |
name: 'runtime' |
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 img_load(_this){ | |
if(_this.files && _this.files[0]){ | |
var reader = new FileReader(); | |
//獲取照片方向角屬性,使用者旋轉控制 | |
EXIF.getData(_this.files[0], function(e) { | |
//orientation表示取得照片的角度,EXIF.getTag()表示取得照片的指定參數數據 | |
var orientation = EXIF.getTag(this, 'Orientation'); | |
//exifdata.DateTime表示取得照片的拍攝時間 | |
var photo_time = this.exifdata.DateTime; | |
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
//初始化 firebase | |
var config = { | |
apiKey: "<API_KEY>", | |
authDomain: "<PROJECT_ID>.firebaseapp.com", | |
databaseURL: "https://<DATABASE_NAME>.firebaseio.com", | |
projectId: "<PROJECT_ID>", | |
storageBucket: "<BUCKET>.appspot.com", | |
messagingSenderId: "<SENDER_ID>", | |
}; | |
firebase.initializeApp(config); |
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
//初始化 firebase | |
var config = { | |
apiKey: "<API_KEY>", | |
authDomain: "<PROJECT_ID>.firebaseapp.com", | |
databaseURL: "https://<DATABASE_NAME>.firebaseio.com", | |
projectId: "<PROJECT_ID>", | |
storageBucket: "<BUCKET>.appspot.com", | |
messagingSenderId: "<SENDER_ID>", | |
}; | |
firebase.initializeApp(config); |
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
/*-----------------google試算表程式碼區-----------------*/ | |
function doGet(e) { | |
var callback = e.parameter.callback; | |
var returnObject = getDate(); | |
return ContentService.createTextOutput(callback+'('+ JSON.stringify(returnObject)+')').setMimeType(ContentService.MimeType.JAVASCRIPT); | |
} | |
function getDate(){ | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var rtjs = []; |
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 add_iframe(){ | |
var html_content = $('#html_content').html(); | |
$("#download").contents().find("#wrapper").html(html_content); | |
setTimeout(function(){ | |
$("#download").get(0).contentWindow.print_html(); | |
},500) | |
} | |
function print_html(){ | |
var random = new Date().getTime(); |
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
/*------canvas building------*/ | |
var canvas_width, | |
canvas_height, | |
stage, | |
imgs = ['https://cdn.tutsplus.com/net/uploads/2014/01/character2.png','http://images.669pic.com/element_min_new_pic/61/53/95/63/485904e3a0a661184c55b4817f293c18.png!/fw/320/quality/90/unsharp/true/canvas/320x302/compress/true/cvscolor/ffffffff']; | |
function init(){ | |
stage = new createjs.Stage("canvas"); | |
responsiveCanvas(); | |
canvas_width = stage.canvas.width; |
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 re_nm = /^\W$/, | |
re_idt = /^[A-Z]{1}\d{9}$/, | |
re_tel = /^0\d{1}\d{6,8}$/, | |
re_ctel = /^09\d{8}$/, | |
re_eml = /^\S+@\w+((\.|-)\w+)*\.\w+$/, | |
errstr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_.#@()*[]{}|!~';:<>,?/\&^%$\"+-"; | |
function form_chk(){ | |
var name = $('input[name="name"]').val(), | |
identity = $('input[name="identity"]').val(), |