target opening options
Cette révision appartient à :
Parent
710f354d0f
révision
85430a5aa3
4 fichiers modifiés avec 52 ajouts et 13 suppressions
|
@ -14,8 +14,14 @@
|
|||
<script type='application/x-javascript' src='chrome://resurrect/content/resurrect.js'></script>
|
||||
|
||||
<vbox>
|
||||
<label value='&resurrect.selectmirror;' />
|
||||
<label value='&resurrect.this;' />
|
||||
<radiogroup>
|
||||
<radio id='targetCurr' label='&resurrect.inCurrTab;' selected='true' />
|
||||
<radio id='targetTab' label='&resurrect.inNewTab;' />
|
||||
<radio id='targetWin' label='&resurrect.inNewWin;' />
|
||||
</radiogroup>
|
||||
|
||||
<label value='&resurrect.fromMirror;' />
|
||||
<listbox id='mirror' rows='5'
|
||||
onclick='resurrect.selectMirror(event);'
|
||||
>
|
||||
|
|
|
@ -72,6 +72,17 @@ var resurrect={
|
|||
return null;
|
||||
},
|
||||
|
||||
// // // // // // // // // // // // // // // // // // // // // // // // // // //
|
||||
|
||||
selectTab:function(aTab) {
|
||||
with (gBrowser) {
|
||||
selectedTab=aTab;
|
||||
mTabBox.selectedPanel=getBrowserForTab(mCurrentTab).parentNode;
|
||||
mCurrentTab.selected = true;
|
||||
updateCurrentBrowser();
|
||||
}
|
||||
},
|
||||
|
||||
// // // // // // // // // // // // // // // // // // // // // // // // // // //
|
||||
|
||||
showDialog:function(url) {
|
||||
|
@ -153,8 +164,25 @@ var resurrect={
|
|||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (gotoUrl) {
|
||||
contentDoc.location.assign(gotoUrl);
|
||||
if (ownerDoc.getElementById('targetTab').getAttribute('selected')) {
|
||||
var newTab=window.opener.gBrowser.addTab(gotoUrl);
|
||||
|
||||
//replicate broken focus-new-tab functionality
|
||||
var prefServ=Components.classes['@mozilla.org/preferences-service;1']
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
if (!prefServ.getBoolPref('browser.tabs.loadInBackground')) {
|
||||
window.opener.resurrect.selectTab(newTab);
|
||||
}
|
||||
} else if (ownerDoc.getElementById('targetWin').getAttribute('selected')) {
|
||||
// the setTimeout keeps focus from returning to the opener
|
||||
setTimeout(function(){
|
||||
window.opener.openNewWindowWith(gotoUrl, null, null);
|
||||
}, 10);
|
||||
} else {
|
||||
contentDoc.location.assign(gotoUrl);
|
||||
}
|
||||
}
|
||||
|
||||
if ('chrome://resurrect/content/resurrect-select-mirror.xul'==window.document.location) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>{0c8fbd76-bdeb-4c52-9b24-d587ce7b9dc3}</em:id>
|
||||
<em:name>Resurrect Pages</em:name>
|
||||
<em:version>0.6</em:version>
|
||||
<em:version>0.9</em:version>
|
||||
<em:description>Resurrect dead pages, by finding their ghosts.</em:description>
|
||||
<em:creator>Anthony Lieuallen</em:creator>
|
||||
<em:homepageURL>http://www.arantius.com/article/resurrect</em:homepageURL>
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
<!ENTITY resurrect.title "Resurrect">
|
||||
<!ENTITY resurrect.accesskey "u">
|
||||
<!ENTITY resurrect.thispage "Resurrect this page">
|
||||
<!ENTITY resurrect.thislink "Resurrect this link">
|
||||
<!ENTITY resurrect.selectmirror "Select a mirror:">
|
||||
<!ENTITY resurrect.title "Resurrect">
|
||||
<!ENTITY resurrect.accesskey "u">
|
||||
<!ENTITY resurrect.this "Resurrect this">
|
||||
<!ENTITY resurrect.thispage "Resurrect this page">
|
||||
<!ENTITY resurrect.thislink "Resurrect this link">
|
||||
<!ENTITY resurrect.fromMirror "From mirror">
|
||||
|
||||
<!ENTITY resurrect.coralcdn "CoralCDN">
|
||||
<!ENTITY resurrect.google "Google Cache">
|
||||
<!ENTITY resurrect.yahoo "Yahoo! Cache">
|
||||
<!ENTITY resurrect.archive "The Internet Archive">
|
||||
<!ENTITY resurrect.msn "MSN Cache">
|
||||
<!ENTITY resurrect.coralcdn "CoralCDN">
|
||||
<!ENTITY resurrect.google "Google Cache">
|
||||
<!ENTITY resurrect.yahoo "Yahoo! Cache">
|
||||
<!ENTITY resurrect.archive "The Internet Archive">
|
||||
<!ENTITY resurrect.msn "MSN Cache">
|
||||
|
||||
<!ENTITY resurrect.inCurrTab "In the current tab/window">
|
||||
<!ENTITY resurrect.inNewTab "In a new tab">
|
||||
<!ENTITY resurrect.inNewWin "In a new window">
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket