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 insertScripts(src) { | |
if (src instanceof Array && src.length) { | |
insertScripts(src.shift()) | |
return insertScripts(src); | |
} | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = src; | |
document.head.appendChild(script); | |
})([ |
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
setInterval(function () { | |
// 取得網頁上所有連結 | |
var a = document.getElementsByTagName('a'); | |
// 針對每個連結跑一次 | |
for (var i in a) { | |
// 檢查是不是真的是連結 | |
if (a.hasOwnProperty(i)) { | |
// 檢查是不是讚的連結 | |
if (a[i].className == "UFILikeLink") { | |
// 檢查是不是還沒按過讚 |
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 MyArray() { | |
var parent = { // Remember the Origional-methods | |
push: this.push | |
} | |
this.push = function (element) { // Override | |
// Do my actions | |
return parent.push.apply(this, arguments); | |
} |
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
// Batch Big5-URLDecoder | |
// go visit http://www.mytju.com/classcode/tools/urldecode_big5.asp | |
(function insertScripts(src) { | |
if (src instanceof Array && src.length) { | |
insertScripts(src.shift()) | |
return insertScripts(src); | |
} | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; |
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(){ | |
function attachEvent(element, event, fn) { | |
if (element.addEventListener) { | |
element.addEventListener(event, fn, false); | |
} else if (element.attachEvent) { | |
element.attachEvent('on' + event, fn); | |
} | |
} | |
window.ready = window.onReady = function(func) { |
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
// a modification from http://goo.gl/tLbLXr | |
var attachEvent = function(element, event, fn) { | |
if (element.addEventListener) | |
element.addEventListener(event, fn, false); | |
else if (element.attachEvent) // if IE | |
element.attachEvent('on' + event, fn); | |
} | |
var onReady = function(func) { |
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
@sansSerifBold: Helvetica, Arial, "LiHei Pro", "AdobeFanHeitiStd-Bold","Microsoft JhengHei", "新細明體"; // 適合粗體標題使用 | |
@sansSerif: Helvetica, Arial, "LiHei Pro", "Microsoft JhengHei", "新細明體"; // 一般內文適用 | |
body, input, select, button { | |
font-family: @sansSerif !important; | |
} | |
h1,h2,h3,h4,h5,h6{ | |
font-family: @sansSerifBold; | |
} |
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 regexCJ = /[\u4e00-\u9fa5]+|[\u0800-\u4e00]+/ | |
!!'안녕하세요'.match(regexCJ) // false | |
!!'Hi There'.match(regexCJ) // false | |
!!'おはよう'.match(regexCJ) // true | |
!!'ㄤㄤ'.match(regexCJ) // true | |
!!'你好'.match(regexCJ) // true | |
!!'中国共产党万岁'.match(regexCJ) // 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
[ | |
{ | |
"id": "030", | |
"name": "南港軟體園區", | |
"line": "文山內湖線", | |
"address": "115台灣台北市南港區捷運南港軟體園區站", | |
"latitude": 25.059904, | |
"longitude": 121.615952 | |
}, | |
{ |
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
html.bs-wrap { | |
font-family: sans-serif; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} | |
body.bs-wrap { | |
margin: 0; | |
} | |
.bs-wrap article, | |
.bs-wrap aside, |
OlderNewer