mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Issue #303 Part 1: Move basilisk files from /browser to /application/basilisk
This commit is contained in:
parent
a951f19dfd
commit
177b28a898
1938 changed files with 0 additions and 0 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,90 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const TELEMETRY_RESULT_ENUM = {
|
||||
RESTORED_DEFAULT: 0,
|
||||
KEPT_CURRENT: 1,
|
||||
CHANGED_ENGINE: 2,
|
||||
CLOSED_PAGE: 3,
|
||||
OPENED_SETTINGS: 4
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
let defaultEngine = document.getElementById("defaultEngine");
|
||||
let originalDefault = Services.search.originalDefaultEngine;
|
||||
defaultEngine.textContent = originalDefault.name;
|
||||
defaultEngine.style.backgroundImage =
|
||||
'url("' + originalDefault.iconURI.spec + '")';
|
||||
|
||||
document.getElementById("searchResetChangeEngine").focus();
|
||||
window.addEventListener("unload", recordPageClosed);
|
||||
document.getElementById("linkSettingsPage")
|
||||
.addEventListener("click", openingSettings);
|
||||
};
|
||||
|
||||
function doSearch() {
|
||||
let queryString = "";
|
||||
let purpose = "";
|
||||
let params = window.location.href.match(/^about:searchreset\?([^#]*)/);
|
||||
if (params) {
|
||||
params = params[1].split("&");
|
||||
for (let param of params) {
|
||||
if (param.startsWith("data="))
|
||||
queryString = decodeURIComponent(param.slice(5));
|
||||
else if (param.startsWith("purpose="))
|
||||
purpose = param.slice(8);
|
||||
}
|
||||
}
|
||||
|
||||
let engine = Services.search.currentEngine;
|
||||
let submission = engine.getSubmission(queryString, null, purpose);
|
||||
|
||||
window.removeEventListener("unload", recordPageClosed);
|
||||
|
||||
let win = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.rootTreeItem
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
win.openUILinkIn(submission.uri.spec, "current", false, submission.postData);
|
||||
}
|
||||
|
||||
function openingSettings() {
|
||||
record(TELEMETRY_RESULT_ENUM.OPENED_SETTINGS);
|
||||
window.removeEventListener("unload", recordPageClosed);
|
||||
}
|
||||
|
||||
function record(result) {
|
||||
Services.telemetry.getHistogramById("SEARCH_RESET_RESULT").add(result);
|
||||
}
|
||||
|
||||
function keepCurrentEngine() {
|
||||
// Calling the currentEngine setter will force a correct loadPathHash to be
|
||||
// written for this engine, so that we don't prompt the user again.
|
||||
Services.search.currentEngine = Services.search.currentEngine;
|
||||
record(TELEMETRY_RESULT_ENUM.KEPT_CURRENT);
|
||||
doSearch();
|
||||
}
|
||||
|
||||
function changeSearchEngine() {
|
||||
let engine = Services.search.originalDefaultEngine;
|
||||
if (engine.hidden)
|
||||
engine.hidden = false;
|
||||
Services.search.currentEngine = engine;
|
||||
|
||||
record(TELEMETRY_RESULT_ENUM.RESTORED_DEFAULT);
|
||||
|
||||
doSearch();
|
||||
}
|
||||
|
||||
function recordPageClosed() {
|
||||
record(TELEMETRY_RESULT_ENUM.CLOSED_PAGE);
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
|
||||
%htmlDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
||||
%globalDTD;
|
||||
<!ENTITY % searchresetDTD SYSTEM "chrome://browser/locale/aboutSearchReset.dtd">
|
||||
%searchresetDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<head>
|
||||
<title>&searchreset.tabtitle;</title>
|
||||
<link rel="stylesheet" type="text/css" media="all"
|
||||
href="chrome://global/skin/in-content/info-pages.css"/>
|
||||
<link rel="stylesheet" type="text/css" media="all"
|
||||
href="chrome://browser/skin/searchReset.css"/>
|
||||
<link rel="icon" type="image/png"
|
||||
href="chrome://browser/skin/favicon-search-16.svg"/>
|
||||
|
||||
<script type="application/javascript;version=1.8"
|
||||
src="chrome://browser/content/search/searchReset.js"/>
|
||||
</head>
|
||||
|
||||
<body dir="&locale.dir;">
|
||||
|
||||
<div class="container">
|
||||
<div class="title">
|
||||
<h1 class="title-text">&searchreset.pageTitle;</h1>
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>&searchreset.pageInfo1;</p>
|
||||
<p>&searchreset.selector.label;<span id="defaultEngine"/></p>
|
||||
|
||||
<p>&searchreset.beforelink.pageInfo2;<a id="linkSettingsPage" href="about:preferences#search">&searchreset.link.pageInfo2;</a>&searchreset.afterlink.pageInfo2;</p>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<xul:button id="searchResetKeepCurrent"
|
||||
label="&searchreset.noChangeButton;"
|
||||
accesskey="&searchreset.noChangeButton.access;"
|
||||
oncommand="keepCurrentEngine();"/>
|
||||
<xul:button class="primary"
|
||||
id="searchResetChangeEngine"
|
||||
label="&searchreset.changeEngineButton;"
|
||||
accesskey="&searchreset.changeEngineButton.access;"
|
||||
oncommand="changeSearchEngine();"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
.searchbar-textbox {
|
||||
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar-textbox");
|
||||
}
|
||||
|
||||
.search-one-offs {
|
||||
-moz-binding: url("chrome://browser/content/search/search.xml#search-one-offs");
|
||||
}
|
||||
|
||||
.search-setting-button[compact=true],
|
||||
.search-setting-button-compact:not([compact=true]) {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
browser.jar:
|
||||
content/browser/search/search.xml (content/search.xml)
|
||||
content/browser/search/searchbarBindings.css (content/searchbarBindings.css)
|
||||
content/browser/search/searchReset.xhtml (content/searchReset.xhtml)
|
||||
content/browser/search/searchReset.js (content/searchReset.js)
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
Loading…
Add table
Add a link
Reference in a new issue