Skip to content
Snippets Groups Projects
Verified Commit f142bbf3 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! Bug 10760: Integrate TorButton to TorBrowser core

Bug 41600 - Remove old circuit display.
parent 9d79898b
Branches
No related tags found
1 merge request!609Bug 41687: Rebased alpha to 102.10
......@@ -35,8 +35,7 @@
<?xml-stylesheet href="chrome://browser/skin/searchbar.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/tor-circuit-display.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/torbutton.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/onionservices/onionservices.css" type="text/css"?>
<!DOCTYPE window [
#include browser-doctype.inc
......@@ -122,7 +121,6 @@
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
Services.scriptloader.loadSubScript("chrome://torbutton/content/tor-circuit-display.js", this);
Services.scriptloader.loadSubScript("chrome://torbutton/content/torbutton.js", this);
window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
......
......
......@@ -92,28 +92,6 @@
</vbox>
</hbox>
<!-- Circuit display section -->
<vbox id="circuit-display-container" class="identity-popup-section">
<toolbarseparator/>
<vbox id="circuit-display-header" flex="1" role="group"
aria-labelledby="circuit-display-headline">
<hbox flex="1">
<label id="circuit-display-headline"
role="heading" aria-level="2">&torbutton.circuit_display.title;</label>
</hbox>
</vbox>
<vbox id="circuit-display-content">
<html:ul id="circuit-display-nodes" dir="auto"/>
<hbox id="circuit-guard-note-container"/>
<hbox id="circuit-reload-button-container">
<html:button id="circuit-reload-button"
onclick="torbutton_new_circuit()"
default="true">&torbutton.circuit_display.new_circuit;</html:button>
</hbox>
</vbox>
</vbox>
<!-- Clear Site Data Button -->
<vbox hidden="true"
id="identity-popup-clear-sitedata-footer">
......
......
This diff is collapsed.
......@@ -12,11 +12,7 @@ var torbutton_new_circuit;
// TODO: Double-check there are no strange exploits to defeat:
// http://kb.mozillazine.org/Links_to_local_pages_don%27t_work
/* global gBrowser, CustomizableUI,
createTorCircuitDisplay, gFindBarInitialized,
gFindBar, OpenBrowserWindow, PrivateBrowsingUtils,
Services, AppConstants
*/
/* global gBrowser, Services, AppConstants */
let {
unescapeTorString,
......@@ -256,16 +252,6 @@ var torbutton_new_circuit;
torbutton_log(1, "registering Tor check observer");
torbutton_tor_check_observer.register();
// Create the circuit display even though the control port might not be
// ready yet, as the circuit display will wait for the controller to be
// available anyway.
try {
createTorCircuitDisplay("extensions.torbutton.display_circuit");
circuitDisplayCreated = true;
} catch (e) {
torbutton_log(4, "Error creating the tor circuit display " + e);
}
// Arrange for our about:tor content script to be loaded in each frame.
window.messageManager.loadFrameScript(
"chrome://torbutton/content/aboutTor/aboutTor-content.js",
......
......
/*
This CSS file is for styling the tor circuit display, which consists of a title,
a domain, and a bulleted list.
Each bullet in the circuit node list is supposed to represent a Tor circuit node,
and lines drawn between them to represent Tor network inter-relay connections.
*/
#circuit-display-container {
margin-inline: 8px;
margin-top: 0px;
margin-bottom: 4px;
padding: 0px 3px;
}
#circuit-display-container > toolbarseparator {
margin-block: 0px;
margin-inline: -3px;
width: calc(100% + 6px);
}
#circuit-display-headline {
margin-inline-start: 8px;
}
#circuit-display-header {
background-image: url(chrome://torbutton/skin/torbutton.svg);
background-repeat: no-repeat;
background-position: 4px 50%;
background-size: 16px auto;
min-height: 16px;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
margin-block: 8px;
}
#circuit-display-header:-moz-locale-dir(rtl) {
background-position-x: right;
}
#circuit-display-header > hbox {
margin-inline-start: 16px;
}
#circuit-display-content {
width: 100%;
}
#circuit-display-content > * {
margin-inline: 0px;
margin-inline-start: 16px;
margin-top: 0px;
margin-bottom: 8px;
}
#circuit-display-content > hbox:not([hidden]) {
display: flex;
}
#circuit-reload-button-container {
padding-top: 8px;
justify-content: flex-end;
}
#circuit-reload-content {
cursor: default;
width: 100%;
}
/* Format the domain text. */
#circuit-display-domain {
opacity: 0.8;
}
#circuit-div {
position: relative;
margin-inline-start: 6px;
}
/* Format the circuit node list. */
ul#circuit-display-nodes {
line-height:32px;
padding-inline-start: 8px;
}
/* Hide default bullets, and draw our own bullets */
ul#circuit-display-nodes li {
background-image: url(chrome://torbutton/skin/tor-circuit-line.svg);
background-position: left center;
background-repeat: no-repeat;
list-style: none;
/* tor circuit svg are 16px wide */
padding-inline-start: calc(16px + 0.5em);
white-space: nowrap;
max-height: 32px;
-moz-context-properties: stroke, stroke-opacity;
stroke: currentColor;
stroke-opacity: 100%;
}
ul#circuit-display-nodes li:dir(rtl) {
background-position: right center;
}
ul#circuit-display-nodes li:first-child {
background-image: url(chrome://torbutton/skin/tor-circuit-line-first.svg);
}
ul#circuit-display-nodes li:last-child {
background-image: url(chrome://torbutton/skin/tor-circuit-line-last.svg);
}
.circuit-ip-address {
font-size: 80%;
opacity: 0.7;
padding-inline-start: 3px;
}
.circuit-guard-info {
font-size: 80%;
color: var(--button-primary-bgcolor);
font-weight: bold;
padding-inline-start: 3px;
}
#circuit-reload-button {
background-color: var(--button-primary-bgcolor);
border-radius: 4px;
border-width: 0px;
color: var(--button-primary-color);
font-weight: 600;
padding: 8px 16px;
margin: 0;
}
#circuit-reload-button:hover {
background-color: var(--button-primary-hover-bgcolor);
}
#circuit-reload-button:active {
background-color: var(--button-primary-active-bgcolor);
}
#circuit-guard-note-container div {
margin-inline-start: 8px;
}
.circuit-guard-name {
font-weight: bold;
}
.circuit-link {
cursor: pointer;
color: var(--urlbar-popup-url-color);
}
.circuit-link:hover {
text-decoration: underline;
}
.circuit-onion {
cursor: pointer;
}
.circuit-onion:hover::after {
opacity: 1;
}
.circuit-onion::after {
background-color: var(--button-bgcolor);;
border-radius: 4px;
color: var(--button-color);
content: attr(data-text-clicktocopy);
font-size: 80%;
opacity: 0;
padding: 5px 10px;
margin: 10px;
text-align: center;
transition: opacity 0.3s cubic-bezier(0.07, 0.95, 0, 1);
}
.circuit-onion:hover::after {
background-color: var(--button-hover-bgcolor);
}
.circuit-onion:active::after {
background-color: var(--button-active-bgcolor);
}
.circuit-onion-copied::after {
content: attr(data-text-copied);
opacity: 1;
}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="32">
<g stroke="context-stroke" opacity="context-stroke-opacity" stroke-width="2" fill="transparent">
<circle cx="50%" cy="50%" r="6"/>
<line x1="50%" y1="22" x2="50%" y2="100%"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="32">
<g stroke="context-stroke" opacity="context-stroke-opacity" stroke-width="2" fill="transparent">
<line x1="50%" y1="0%" x2="50%" y2="10"/>
<circle cx="50%" cy="50%" r="6"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="32">
<g stroke="context-stroke" opacity="context-stroke-opacity" stroke-width="2" fill="transparent">
<line x1="50%" y1="0%" x2="50%" y2="10"/>
<circle cx="50%" cy="50%" r="6"/>
<line x1="50%" y1="22" x2="50%" y2="100%"/>
</g>
</svg>
svg.circuit text {
font-family: Arial;
}
svg#tor-circuit text.node-text {
dominant-baseline: central;
font-size: 14px;
}
svg#tor-circuit circle.node-circle {
stroke: #195021;
stroke-width: 2px;
fill: white;
}
\ No newline at end of file
......@@ -5,7 +5,6 @@ torbutton.jar:
% content torbutton %content/
content/torbutton.js (chrome/content/torbutton.js)
content/tor-circuit-display.js (chrome/content/tor-circuit-display.js)
content/aboutTor/aboutTor-content.js (chrome/content/aboutTor/aboutTor-content.js)
* content/aboutTor/aboutTor.xhtml (chrome/content/aboutTor/aboutTor.xhtml)
content/aboutTor/resources/aboutTor.js (chrome/content/aboutTor/resources/aboutTor.js)
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment