-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca301b8
commit d1bb32a
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
content passworddialogtitle content/ | ||
overlay chrome://global/content/commonDialog.xul chrome://passworddialogtitle/content/settitle.xul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
window.addEventListener("load", function windowLoader(e) { | ||
this.window.removeEventListener("load", windowLoader, false); // Only need it to run this _one_ time | ||
startup() | ||
}, false); | ||
|
||
function startup() { | ||
let displayString = "Enter password: %MAIL%"; | ||
let description = document.getElementById("infoBody").innerHTML; | ||
let reMail = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/i; | ||
let mails = reMail.exec(description) | ||
if (mails != null && mails.length == 1) { | ||
let mail = mails[0] | ||
let host = description.substr(description.lastIndexOf(' ')+1, description.length-description.lastIndexOf(' ')-2) | ||
document.title = displayString.replace("%MAIL%", mail).replace("%HOST%", host) | ||
} else { | ||
console.log("password dialog title: Mail RegEx didn't match description: ", description) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<overlay id="passworddialogtitle-settitle" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
<script type="application/javascript" src="chrome://passworddialogtitle/content/settitle.js"/> | ||
</overlay> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0"?> | ||
|
||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> | ||
<Description about="urn:mozilla:install-manifest"> | ||
<em:id>passworddialogtitle@jonny007-mkd.de</em:id> | ||
<em:name>Password Dialog Title</em:name> | ||
<em:version>0.13</em:version> | ||
<em:creator>Jonny007-MKD</em:creator> | ||
|
||
<em:targetApplication> | ||
<Description> | ||
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> | ||
<em:minVersion>60</em:minVersion> | ||
<em:maxVersion>61</em:maxVersion> | ||
</Description> | ||
</em:targetApplication> | ||
|
||
</Description> | ||
</RDF> |