阅读:1436回复:5
讓鼠標自動隱藏的擴展或腳本?
因為比較常用鍵盤上網,滑鼠一般不用,但鼠標經常擋住網頁的內容,
所以想問有沒有辦法讓鼠標每經過一段時間後自動隱藏,等移動滑鼠再顯示出來的擴展或腳本? |
|
|
1楼#
发布于:2010-03-15 10:42
将附件中的两个脚本放到 配置文件目录 profiles 的 chrome 目录下,重启Firefox 就可以了
|
|
|
2楼#
发布于:2010-03-15 10:42
|
|
|
3楼#
发布于:2010-03-15 10:42
後來找到代碼了,想直接弄到油猴子上,但沒效果,是哪裡有弄錯嗎?
// ==UserScript== // @name Hide Cursor // ==/UserScript== var ucjs_hide_cursor = { _delay: 1000, handleEvent: function(event) { if(this._timeout)clearTimeout(this._timeout); var doc = event.originalTarget.ownerDocument; if(doc instanceof XULDocument)return window.setCursor("auto"); var body = doc.getElementsByTagName("body")[0]; if(this._stored_cursor) { body.style.cursor = this._stored_cursor; this._stored_cursor = null; } this._timeout = setTimeout(function(){ this._stored_cursor = body.style.cursor; window.setCursor("none"); },this._delay,this); } } window.addEventListener("mousemove", ucjs_hide_cursor, true); |
|
|
4楼#
发布于:2010-03-15 10:42
这个是uc脚本,不是gm脚本。
|
|
5楼#
发布于:2010-03-15 10:42
网站太卡了 ( ̄▽ ̄")
|
|