Search

4/27/2009

Aza’s Thoughts » Vote! How to Detect the Social Sites Your Visitors Use

Aza’s Thoughts » Vote! How to Detect the Social Sites Your Visitors Use - 藉由判斷 link 的顏色,知道使用者是否瀏覽過某個站。
SocialHistory.js - aza - Google Code


function getStyle(el, scopeDoc,styleProp) {
if (el.currentStyle)
var y = el.currentStyle[styleProp];
else if (window.getComputedStyle)
var y = scopeDoc.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
return y;
}

沒有留言: