Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Masquer les espaces
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Styles de texte
Modifier l’apparence
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 11 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
47 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
143 lignes
Copier tout
17 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
114 lignes
Copier tout
/* This Source Code Form is subject to the terms of the Mozilla Public
/* This Source Code Form is subject to the terms of the Mozilla Public
Copier
Copié
Copier
Copié
* License, v. 2.0. If a copy of the MPL was not distributed with this
* License, v. 2.0. If a copy of the MPL was not distributed with this
file,
*
file,
You can obtain one at http://mozilla.org/MPL/2.0/. */
*
You can obtain one at http://mozilla.org/MPL/2.0/. */
const wpl = Components.interfaces.nsIWebProgressListener;
const wpl = Components.interfaces.nsIWebProgressListener;
var reporterListener = {
var reporterListener = {
_isBusy: false,
_isBusy: false,
Copier
Copié
Copier
Copié
get statusMeter() {
delete this.statusMeter;
return this.statusMeter = document.getElementById("statusbar-icon");
},
get securityButton() {
get securityButton() {
delete this.securityButton;
delete this.securityButton;
return this.securityButton = document.getElementById("security-button");
return this.securityButton = document.getElementById("security-button");
},
},
Copier
Copié
Copier
Copié
get securityLabel() {
delete this.securityLabel;
return this.securityLabel = document.getElementById("security-status");
},
get securityDisplay() {
delete this.securityDisplay;
return this.securityDisplay = document.getElementById("security-display");
},
QueryInterface: function(aIID) {
QueryInterface: function(aIID) {
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupports))
aIID.equals(Components.interfaces.nsISupports))
return this;
return this;
throw Components.results.NS_NOINTERFACE;
throw Components.results.NS_NOINTERFACE;
},
},
Copier
Copié
Copier
Copié
onStateChange: function(/*in nsIWebProgress*/ aWebProgress,
onStateChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsIRequest*/ aRequest,
/*in unsigned long*/ aStateFlags,
/*in unsigned long*/ aStateFlags,
/*in nsresult*/ aStatus) {
/*in nsresult*/ aStatus) {
Copier
Copié
Copier
Copié
if (aStateFlags & wpl.STATE_START &&
aStateFlags & wpl.STATE_IS_NETWORK) {
this.statusMeter.value = 0;
this.statusMeter.parentNode.collapsed = false;
this.securityLabel.collapsed = true;
}
else if (aStateFlags & wpl.STATE_STOP &&
aStateFlags & wpl.STATE_IS_NETWORK) {
this.statusMeter.parentNode.collapsed = true;
this.securityLabel.collapsed = false;
}
},
},
onProgressChange: function(/*in nsIWebProgress*/ aWebProgress,
onProgressChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsIRequest*/ aRequest,
/*in long*/ aCurSelfProgress,
/*in long*/ aCurSelfProgress,
/*in long */aMaxSelfProgress,
/*in long */aMaxSelfProgress,
/*in long */aCurTotalProgress,
/*in long */aCurTotalProgress,
/*in long */aMaxTotalProgress) {
/*in long */aMaxTotalProgress) {
Copier
Copié
Copier
Copié
if (aMaxTotalProgress > 0) {
let percentage = (aCurTotalProgress * 100) / aMaxTotalProgress;
this.statusMeter.value = percentage;
}
},
},
onLocationChange: function(/*in nsIWebProgress*/ aWebProgress,
onLocationChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsIRequest*/ aRequest,
/*in nsIURI*/ aLocation) {
/*in nsIURI*/ aLocation) {
Copier
Copié
Copier
Copié
this.securityDisplay.setAttribute('label',
aLocation.
host)
;
document.getElementById("headerMessage").textContent =
aLocation.
spec
;
},
},
onStatusChange: function(/*in nsIWebProgress*/ aWebProgress,
onStatusChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsIRequest*/ aRequest,
/*in nsresult*/ aStatus,
/*in nsresult*/ aStatus,
/*in wstring*/ aMessage) {
/*in wstring*/ aMessage) {
},
},
onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress,
onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress,
/*in nsIRequest*/ aRequest,
/*in nsIRequest*/ aRequest,
/*in unsigned long*/ aState) {
/*in unsigned long*/ aState) {
const wpl_security_bits = wpl.STATE_IS_SECURE |
const wpl_security_bits = wpl.STATE_IS_SECURE |
wpl.STATE_IS_BROKEN |
wpl.STATE_IS_BROKEN |
wpl.STATE_IS_INSECURE |
wpl.STATE_IS_INSECURE |
wpl.STATE_SECURE_HIGH |
wpl.STATE_SECURE_HIGH |
wpl.STATE_SECURE_MED |
wpl.STATE_SECURE_MED |
wpl.STATE_SECURE_LOW;
wpl.STATE_SECURE_LOW;
Copier
Copié
Copier
Copié
let
browser = document.getElementById("requestFrame");
var
browser = document.getElementById("requestFrame");
let
level;
var
level;
switch (aState & wpl_security_bits) {
switch (aState & wpl_security_bits) {
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH:
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH:
level = "high";
level = "high";
break;
break;
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_MED:
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_MED:
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW:
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW:
level = "low";
level = "low";
break;
break;
case wpl.STATE_IS_BROKEN:
case wpl.STATE_IS_BROKEN:
level = "broken";
level = "broken";
break;
break;
}
}
if (level) {
if (level) {
this.securityButton.setAttribute("level", level);
this.securityButton.setAttribute("level", level);
this.securityButton.hidden = false;
this.securityButton.hidden = false;
Copier
Copié
Copier
Copié
this.securityLabel.setAttribute("label", browser.securityUI.tooltipText);
} else {
} else {
this.securityButton.hidden = true;
this.securityButton.hidden = true;
this.securityButton.removeAttribute("level");
this.securityButton.removeAttribute("level");
}
}
this.securityButton.setAttribute("tooltiptext",
this.securityButton.setAttribute("tooltiptext",
browser.securityUI.tooltipText);
browser.securityUI.tooltipText);
}
}
}
}
function cancelRequest()
function cancelRequest()
{
{
reportUserClosed();
reportUserClosed();
window.close();
window.close();
}
}
function reportUserClosed()
function reportUserClosed()
{
{
Copier
Copié
Copier
Copié
let request = window.arguments[0]
;
let request = window.arguments[0]
.wrappedJSObject
;
request.QueryInterface(Components.interfaces.prplIRequestBrowser)
;
request.cancelled();
request.cancelled();
}
}
function loadRequestedUrl()
function loadRequestedUrl()
{
{
Copier
Copié
Copier
Copié
let request = window.arguments[0]
;
let request = window.arguments[0]
.wrappedJSObject
;
request.QueryInterface(Components.interfaces.prplIRequestBrowser)
;
document.getElementById("headerMessage").textContent = request.promptText;
document.getElementById("headerMessage").textContent = request.promptText;
let account = request.account;
let account = request.account;
Copier
Copié
Copier
Copié
document.getElementById("headerLabel").value =
if (request.iconURI != "")
account.protocol.name + " - " + account.name;
document.getElementById("headerImage").src =
request.
icon
URI
;
document.getElementById("headerImage").src =
account.protocol.
icon
Base
URI
+ "icon48.png"
;
Copier
Copié
Copier
Copié
let
browser = document.getElementById("requestFrame");
var
browser = document.getElementById("requestFrame");
browser.addProgressListener(reporterListener,
browser.addProgressListener(reporterListener,
Components.interfaces.nsIWebProgress.NOTIFY_ALL);
Components.interfaces.nsIWebProgress.NOTIFY_ALL);
Copier
Copié
Copier
Copié
let
url = request.url;
var
url = request.url;
if (url != "")
if (url != "")
{
browser.setAttribute("src", url);
browser.setAttribute("src", url);
Copier
Copié
Copier
Copié
document.getElementById("headerMessage").textContent = url;
}
request.loaded(window, browser.webProgress);
request.loaded(window, browser.webProgress);
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
/* 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/. */ const wpl = Components.interfaces.nsIWebProgressListener; var reporterListener = { _isBusy: false, get statusMeter() { delete this.statusMeter; return this.statusMeter = document.getElementById("statusbar-icon"); }, get securityButton() { delete this.securityButton; return this.securityButton = document.getElementById("security-button"); }, get securityLabel() { delete this.securityLabel; return this.securityLabel = document.getElementById("security-status"); }, get securityDisplay() { delete this.securityDisplay; return this.securityDisplay = document.getElementById("security-display"); }, QueryInterface: function(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || aIID.equals(Components.interfaces.nsISupportsWeakReference) || aIID.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; }, onStateChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in unsigned long*/ aStateFlags, /*in nsresult*/ aStatus) { if (aStateFlags & wpl.STATE_START && aStateFlags & wpl.STATE_IS_NETWORK) { this.statusMeter.value = 0; this.statusMeter.parentNode.collapsed = false; this.securityLabel.collapsed = true; } else if (aStateFlags & wpl.STATE_STOP && aStateFlags & wpl.STATE_IS_NETWORK) { this.statusMeter.parentNode.collapsed = true; this.securityLabel.collapsed = false; } }, onProgressChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in long*/ aCurSelfProgress, /*in long */aMaxSelfProgress, /*in long */aCurTotalProgress, /*in long */aMaxTotalProgress) { if (aMaxTotalProgress > 0) { let percentage = (aCurTotalProgress * 100) / aMaxTotalProgress; this.statusMeter.value = percentage; } }, onLocationChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in nsIURI*/ aLocation) { this.securityDisplay.setAttribute('label', aLocation.host); }, onStatusChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in nsresult*/ aStatus, /*in wstring*/ aMessage) { }, onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in unsigned long*/ aState) { const wpl_security_bits = wpl.STATE_IS_SECURE | wpl.STATE_IS_BROKEN | wpl.STATE_IS_INSECURE | wpl.STATE_SECURE_HIGH | wpl.STATE_SECURE_MED | wpl.STATE_SECURE_LOW; let browser = document.getElementById("requestFrame"); let level; switch (aState & wpl_security_bits) { case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH: level = "high"; break; case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_MED: case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW: level = "low"; break; case wpl.STATE_IS_BROKEN: level = "broken"; break; } if (level) { this.securityButton.setAttribute("level", level); this.securityButton.hidden = false; this.securityLabel.setAttribute("label", browser.securityUI.tooltipText); } else { this.securityButton.hidden = true; this.securityButton.removeAttribute("level"); } this.securityButton.setAttribute("tooltiptext", browser.securityUI.tooltipText); } } function cancelRequest() { reportUserClosed(); window.close(); } function reportUserClosed() { let request = window.arguments[0]; request.QueryInterface(Components.interfaces.prplIRequestBrowser); request.cancelled(); } function loadRequestedUrl() { let request = window.arguments[0]; request.QueryInterface(Components.interfaces.prplIRequestBrowser); document.getElementById("headerMessage").textContent = request.promptText; let account = request.account; document.getElementById("headerLabel").value = account.protocol.name + " - " + account.name; document.getElementById("headerImage").src = account.protocol.iconBaseURI + "icon48.png"; let browser = document.getElementById("requestFrame"); browser.addProgressListener(reporterListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL); let url = request.url; if (url != "") browser.setAttribute("src", url); request.loaded(window, browser.webProgress); }
Texte modifié
Ouvrir un fichier
/* 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/. */ const wpl = Components.interfaces.nsIWebProgressListener; var reporterListener = { _isBusy: false, get securityButton() { delete this.securityButton; return this.securityButton = document.getElementById("security-button"); }, QueryInterface: function(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || aIID.equals(Components.interfaces.nsISupportsWeakReference) || aIID.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; }, onStateChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in unsigned long*/ aStateFlags, /*in nsresult*/ aStatus) { }, onProgressChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in long*/ aCurSelfProgress, /*in long */aMaxSelfProgress, /*in long */aCurTotalProgress, /*in long */aMaxTotalProgress) { }, onLocationChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in nsIURI*/ aLocation) { document.getElementById("headerMessage").textContent = aLocation.spec; }, onStatusChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in nsresult*/ aStatus, /*in wstring*/ aMessage) { }, onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress, /*in nsIRequest*/ aRequest, /*in unsigned long*/ aState) { const wpl_security_bits = wpl.STATE_IS_SECURE | wpl.STATE_IS_BROKEN | wpl.STATE_IS_INSECURE | wpl.STATE_SECURE_HIGH | wpl.STATE_SECURE_MED | wpl.STATE_SECURE_LOW; var browser = document.getElementById("requestFrame"); var level; switch (aState & wpl_security_bits) { case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH: level = "high"; break; case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_MED: case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW: level = "low"; break; case wpl.STATE_IS_BROKEN: level = "broken"; break; } if (level) { this.securityButton.setAttribute("level", level); this.securityButton.hidden = false; } else { this.securityButton.hidden = true; this.securityButton.removeAttribute("level"); } this.securityButton.setAttribute("tooltiptext", browser.securityUI.tooltipText); } } function cancelRequest() { reportUserClosed(); window.close(); } function reportUserClosed() { let request = window.arguments[0].wrappedJSObject; request.cancelled(); } function loadRequestedUrl() { let request = window.arguments[0].wrappedJSObject; document.getElementById("headerMessage").textContent = request.promptText; let account = request.account; if (request.iconURI != "") document.getElementById("headerImage").src = request.iconURI; var browser = document.getElementById("requestFrame"); browser.addProgressListener(reporterListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL); var url = request.url; if (url != "") { browser.setAttribute("src", url); document.getElementById("headerMessage").textContent = url; } request.loaded(window, browser.webProgress); }
Trouver la différence