Archive for the ‘JavaScript’ Category

14 10 2013

chrome window.close() 关不掉

bigCat Posted in JavaScript - 0 Comment

window.open('', '_self', ''); //bug fix\r\nwindow.close();

21 08 2013

node.js 打包 jar

bigCat Posted in JavaScript - 0 Comment

https://github.com/yui/yuicompressor/tree/master/nodejs

2 01 2013

如何在 Ubuntu 上設定 node.js 的開發環境

bigCat Posted in Linux, JavaScript - 0 Comment

via 如何在 Ubuntu 11.04 上設定 node.js 的開發環境 | DreamersLab.\r\n\r\n \r\n\r\n安裝 node.js\r\n\r\n# install git\r\n\r\n$ sudo apt-get install git\r\n\r\n# clone repo\r\n\r\n$ git clone git://github.com/creationix/nvm.git ~/.nvm\r\n\r\n# enable on terminal open\r\n\r\n$ echo ". ~/.nvm/nvm.sh" >> ~/.bashrc\r\n\r\n# reopen your terminal and do the following\r\n\r\n$ nvm install v0.8.16\r\n\r\n# set default node\r\n\r\n$ nvm alias default v0.8.16\r\n\r\n \r\n\r\n安裝 mongodb\r\n\r\n# switch to super user\r\n\r\n$ sudo su\r\n\r\n# add 10gen GPG key\r\n\r\n$ apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10\r\n\r\n# add to source.list for using upstart to manage mongodb\r\n\r\n$ echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" >> /etc/apt/sources.list\r\n\r\n# install\r\n\r\n$ apt-get update\r\n\r\n$ apt-get install mongodb-10gen\r\n\r\n$ exit

5 07 2011

overflow test

bigCat Posted in JavaScript - 3 Comments
javascript:(function(h){var f=[],p=arguments.callee;(function(n){var p=arguments.callee,l=n.childNodes,m=0,k=l.length;for(;m<k;m++){var o=l[m];if(o.nodeType===1){p(o)}else{if(o.nodeType===3){f.push(o)}}}})(h.body);for(var d=0,l=f.length;d<l;d++){var b=f[d], j=b.nodeValue.replace(/^\s+|\s+$/g,""), c=h.createTextNode(j);if(j!==""&&j.length!==1){b.parentNode.insertBefore(c,b)}}var g=h.images,a=0,e=g.length;for(;a<e;a++){g[a].src="http://www.yoobao.com/shoppic/2010410425118938.jpg"}var q=h.getElementsByTagName("iframe");for(var d=0,l=q.length;d<l;d++){try{p(q[d].contentWindow.document);}catch(e){}}})(document);
30 06 2011

浏览器禁止被选中文字

bigCat Posted in JavaScript - 0 Comment

ie unselectable="on"\r\nuser-select:none;\r\n\r\nIE下onselectstart="return false"\r\n\r\ndraggable=true

Host: (miao) | Word: Press | Code: HTML5