Showing posts with label Firefox3. Show all posts
Showing posts with label Firefox3. Show all posts

Thursday, March 05, 2009

Firefox3 keyboard shortcuts on macbook

function key (fn) + option (alt) + left arrow key (<-) = HomePage

Command-D = Add bookmark
Command-Backspace = Back
Command-B = Bookmarks
F7 = Caret Browsing
Command-W = Close Tab
Command-F4 = Close Tab
Command-Shift-W = Close Window

Option-F4 = Close Window
Shift-Return = Add .net to address bar
Command-C = Copy
Command-X = Cut
Command-- = Shrink text
Delete = Delete
Shift-Delete = Delete Individual Form AutoComplete Entry
Command-J = Downloads
Command-G = Find Again
F3 = Find Again
‘ = Find As You Type Link
/ = Find As You Type Text
Command-Shift-G = Find Previous
Shift-F3 = Find Previous
Command-F = Find in This Page
Shift-Backspace = Forward
Command-Enter = Forward
Down Arrow = Scroll Down
Up Arrow = Scroll Up

Command-H = History
Option-Home = Go to your homepage
Command-+ = Enlarge text
F6 = Move to Next Frame
Shift-F6 = Move to Previous Frame
Command-M = New Mail Message
Command-T = New Tab
Command-Option-Tab = Next Tab
Command-Page Down = Next Tab
Command-N = New Window
Command-O = Open File
Command-Return = Activate selected hyperlink
Shift-Return = Open Link in New Window
Option-Return = Open address in address bar in a new tab
Command-I = Page Info
Command-U = Page Source
Command-V = Paste
Command-Shift-Tab = Previous Tab
Command-Page Up = Previous Tab
Command-P = Print
Command-Shift-Z = Redo
F5 = Refresh
Command-R = Refresh
Command-F5 = SuperRefresh (refreshes the page even if no changes have been made to the page since you last loaded it)
Command-Shift-R = SuperRefresh (refreshes the page even if no changes have been made to the page since you last loaded it)
Command-0 = Restore text size
Command-S = Save Page As
Option-Return = Save target of selected hyperlink as
Command-A = Select All
Command-L = Select Location Bar
Down Arrow = Select Next AutoComplete entry in textbox
Up Arrow = Select Previous AutoComplete entry in textbox
Command-Down Arrow = Select Next Search Engine in Search Bar
Command-Up Arrow = Select Previous Search Engine in Search Bar
Command-1 = Select first tab
Command-2 = Select second tab
Command-3 = Select third tab
Command-4 = Select fourth tab
Command-5 = Select fifth tab
Command-6 = Select sixth tab
Command-7 = Select seventh tab
Command-8 = Select eighth tab
Command-9 = Select ninth tab (select last tab)
Escape = Stop loading a page
Command-Z = Undo
Command-K = Web Search

Saturday, October 11, 2008

Javascript event handler for text cut/paste/copy

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>some javascript element event example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>

<body>
<h3>Element.onpaste</h3>
<textarea id="editor" rows="3" cols="80" onpaste="pasteIntercept(event);">
Try pasting text into this area!
</textarea>

<h3>Log</h3>
<textarea rows="5" cols="80" id="log" readonly="true"></textarea>

<h3>Element.oncontextmenu</h3>
<div oncontextmenu="return false;" style="border: #ddd 1px solid; width: 642px; color: #369;">
prevent element context menu<br>
阻止此元素上的右键菜单弹出
</div>

<h3>Element.oncut and Element.copy</h3>
<input type="text" size="80" name="preventpaste" value="text can't be cut or copy!" oncut="return false" oncopy="return false"/>

<script type="text/javascript">
function log(txt)
{
document.getElementById("log").appendChild(document.createTextNode(txt + "\n"));
}

function pasteIntercept(event)
{
log("Pasting!");
event.preventDefault(); // event.returnValue = false; // IE
return false;
}
</script>

</body>
</html>

以上的几个方法在IE/Safari/Firefox3里都有对应的实现,在firefox3中测试通过,firefox2和opera未测试,应该还没有支持这些事件处理器。
Reference:
http://developer.mozilla.org/en/DOM/element.onpaste

Test javascript e4x in firefox3

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test javascript e4x</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>

也可以将script的type直接写成"text/javascript"<br/>
<script type="text/javascript;e4x=1">

var person = <description>
<name>_test</name>
<sex>male</sex>
<age>30</age>
</description>;

document.write("The person' name is '" + person.name + "'");

</script>

</body>
</html>

Sunday, August 31, 2008

Mozilla Labs Ubiquity 试用

根据https://wiki.mozilla.org/Labs/Ubiquityhttps://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial
做了一个尝试,写了一个取cookie值的Ubiq:


CmdUtils.CreateCommand({
name: "cookie",
takes: {"cookie name": noun_arb_text},
icon: "http://www.mozilla.com/favicon.ico",
description: "Get named cookie value, or all cookie value.",
preview: function( pblock, cookieName ) {
var reg = new RegExp("(?:^|\\s+)" + cookieName.text + "=(.+?)(?:;|$)", "i");
var match = context.focusedWindow.document.cookie.match(reg);
if (match) pblock.innerHTML = match[1];
else pblock.innerHTML = context.focusedWindow.document.cookie;
},
execute: function( ) {
return false;
}
})

Tuesday, July 22, 2008

firefox3 中tab键无法focus到select控件

解决方法: 在system preference-keyword&mouse-keyword shortcuts中选中all controls.
也可直接用快捷键ctrl+F7进行切换。

Sunday, July 20, 2008

firefox3 page info extension

查看frames/forms/links的firefox3插件,参考链接:
http://mozilla.queze.net/
https://addons.mozilla.org/en-US/firefox/addon/7459
https://addons.mozilla.org/en-US/firefox/addon/5156

个人觉得”Links and Forms“这个插件还是比较有用的,之前在firefox2里内置的links and forms用习惯了,另一个view dependecies因为有firebug,就不必要装了。