Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix white-space issues (#188)
  • Loading branch information
UtiluMark authored and whimboo committed Oct 2, 2015
1 parent eff8f9e commit dabd430
Show file tree
Hide file tree
Showing 21 changed files with 89 additions and 95 deletions.
2 changes: 1 addition & 1 deletion extension/LICENSE
@@ -1,4 +1,4 @@
All files in this extension are assumed to be licensed under the
All files in this extension are assumed to be licensed under the
Mozilla Public License, v. 2.0 unless otherwise specified.

The MPL is available at http://mozilla.org/MPL/2.0/
Expand Down
4 changes: 2 additions & 2 deletions extension/chrome/content/aboutNightly/aboutNightly.xhtml
Expand Up @@ -31,7 +31,7 @@
<h1>About Nightly Tester Tools</h1>

<div id="about"><a name="about"></a>
Author:
Author:
</div>

<div id="contributors"><a name="contributors"></a>
Expand All @@ -42,7 +42,7 @@

<div id="features"><a name="features"></a>
<h2>Features</h2>

<ul>
<li>titlebar customization</li>
<li>copy build id to clipboard</li>
Expand Down
8 changes: 4 additions & 4 deletions extension/chrome/content/browserOverlay.xul
Expand Up @@ -14,7 +14,7 @@
<stringbundleset id="stringbundleset">
<stringbundle id="nightlyBundle" src="chrome://nightly/locale/nightly.properties"/>
</stringbundleset>

<script type="text/javascript" src="nightly.js" />
<script type="text/javascript" src="browser.js" />
<script type="text/javascript" src="crashme.js" />
Expand All @@ -33,7 +33,7 @@
oncommand="nightly.insertTemplate('buildid');"/>
</toolbarpalette>


<menupopup id="menu_ToolsPopup">
<menu id="nightly-menu" label="Nightly Tester Tools" insertafter="devToolsSeparator">
<menupopup onpopupshowing="nightly.menuPopup(event,this);">
Expand Down Expand Up @@ -74,7 +74,7 @@
</menupopup>
</menu>
</menupopup>

<vbox id="appmenuSecondaryPane">
<menu id="nightly-appmenu" label="Nightly Tester Tools" insertafter="appmenu_addons">
<menupopup onpopupshowing="nightly.menuPopup(event,this);">
Expand Down Expand Up @@ -115,5 +115,5 @@
</menupopup>
</menu>
</vbox>

</overlay>
2 changes: 1 addition & 1 deletion extension/chrome/content/messenger.js
Expand Up @@ -32,7 +32,7 @@ init: function()
}
nightly.variables.defaulttitle=brandbundle.getString("brandShortName");
nightly.variables.brandname=brandbundle.getString("brandFullName");

var tabmail = document.getElementById("tabmail");
if (tabmail && typeof(tabmail.setDocumentTitle) === "function")
{
Expand Down
8 changes: 3 additions & 5 deletions extension/chrome/content/messengerOverlay.xul
Expand Up @@ -28,7 +28,7 @@
oncommand="nightly.insertTemplate('buildid');"/>
</toolbarpalette>


<menupopup id="taskPopup">
<menu id="nightly-menu" label="Nightly Tester Tools" insertafter="devToolsSeparator">
<menupopup onpopupshowing="nightly.menuPopup(event,this);">
Expand All @@ -38,8 +38,7 @@
<menuitem id="nightly-build-insert" label="&nightly.id.insert.label;" oncommand="nightly.insertTemplate('buildid');"/>
<menuitem id="nightly-list-copy" label="&nightly.extensions.copy.label;" oncommand="nightly.copyExtensions();"/>
<menuitem id="nightly-list-insert" label="&nightly.extensions.insert.label;" oncommand="nightly.insertExtensions();"/>
<menuitem id="nightly-aboutsupport" label="&nightly.extensions.aboutsup.label;"
oncommand="nightly.pastebinAboutSupport();"/>
<menuitem id="nightly-aboutsupport" label="&nightly.extensions.aboutsup.label;" oncommand="nightly.pastebinAboutSupport();"/>
<menuseparator/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
<menuitem id="nightly-pushlog-lasttocurrent" label="&nightly.pushlog.lasttocurrent.label;" oncommand="nightly.openPushlogToCurrentBuild();"/>
Expand Down Expand Up @@ -81,8 +80,7 @@
<menuitem id="nightly-build-insert" label="&nightly.id.insert.label;" oncommand="nightly.insertTemplate('buildid');"/>
<menuitem id="nightly-list-copy" label="&nightly.extensions.copy.label;" oncommand="nightly.copyExtensions();"/>
<menuitem id="nightly-list-insert" label="&nightly.extensions.insert.label;" oncommand="nightly.insertExtensions();"/>
<menuitem id="nightly-aboutsupport" label="&nightly.extensions.aboutsup.label;"
oncommand="nightly.pastebinAboutSupport();"/>
<menuitem id="nightly-aboutsupport" label="&nightly.extensions.aboutsup.label;" oncommand="nightly.pastebinAboutSupport();"/>
<menuseparator/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
<menuitem id="nightly-pushlog-lasttocurrent" label="&nightly.pushlog.lasttocurrent.label;" oncommand="nightly.openPushlogToCurrentBuild();"/>
Expand Down
33 changes: 16 additions & 17 deletions extension/chrome/content/nightly.js
Expand Up @@ -36,7 +36,7 @@ variables: {
get processor() this.appInfo.XPCOMABI.split("-")[0],
get compiler() this.appInfo.XPCOMABI.split(/-(.*)$/)[1],
get defaulttitle() { return nightlyApp.defaultTitle; },
get tabscount() {return nightlyApp.tabsCount; },
get tabscount() { return nightlyApp.tabsCount; },
get tabtitle() { return nightlyApp.tabTitle; },
profile: null,
toolkit: "cairo",
Expand All @@ -57,15 +57,15 @@ getString: function(name, format) {

preferences: null,

isTrunk: function() {
isTrunk: function() {
let isNightlyRepo = false;

for each (var repo in nightlyApp.repository) {
isNightlyRepo = isNightlyRepo || nightly.getRepo().indexOf(repo) != -1;
}

return isNightlyRepo
&& (nightly.variables.platformversion.indexOf("pre") != -1 ||
&& (nightly.variables.platformversion.indexOf("pre") != -1 ||
nightly.variables.platformversion.indexOf(".0a") != -1);
},

Expand Down Expand Up @@ -128,8 +128,8 @@ init: function() {

nightlyApp.init();
nightly.prefChange("idtitle");
var changeset = nightly.getChangeset();

var changeset = nightly.getChangeset();
var currChangeset = nightly.preferences.getCharPref("currChangeset");
if (nightly.isTrunk() && (!currChangeset || changeset != currChangeset)) {
// keep track of previous nightly's changeset for pushlog
Expand All @@ -148,8 +148,7 @@ prefChange: function(pref) {
nightly.updateTitlebar();
},

updateTitlebar: function()
{
updateTitlebar: function() {
if (nightly.preferences.getBoolPref("idtitle")) {
var title = nightly.getTemplate("title");
nightlyApp.setCustomTitle(nightly.generateText(title));
Expand Down Expand Up @@ -250,7 +249,7 @@ parseHTML: function(url, callback) {
var frame = document.getElementById("sample-frame");
if (!frame)
frame = document.createElement("iframe");

frame.setAttribute("id", "sample-frame");
frame.setAttribute("name", "sample-frame");
frame.setAttribute("type", "content");
Expand All @@ -262,7 +261,7 @@ parseHTML: function(url, callback) {
if (doc.location.href == "about:blank" || doc.defaultView.frameElement)
return;

setTimeout(function () { // give enough time for js to populate page
setTimeout(function () { // give enough time for js to populate page
callback(doc);
}, 800);
}, true);
Expand All @@ -280,13 +279,13 @@ pastebinAboutSupport: function() {
menuPopup: function(event, menupopup) {
if (menupopup == event.target) {
var attext = false;

var element = document.commandDispatcher.focusedElement;
if (element) {
var type = element.localName.toLowerCase();
attext = ((type == "input") || (type == "textarea"))
}

var node=menupopup.firstChild;
while (node) {
if (node.id.indexOf("-insert") != -1)
Expand Down Expand Up @@ -325,11 +324,11 @@ insertTemplate: function(template) {
// no usable element was found
const psButtonFlags = Components.interfaces.nsIPromptService;
var promptOptions = {};
promptOptions.text = nightly.getString("nightly.notextbox.message") + "\n" +
promptOptions.text = nightly.getString("nightly.notextbox.message") + "\n" +
nightly.getString("nightly.notextbox.clipboardInstead.message");
promptOptions.buttonFlags = psButtonFlags.BUTTON_POS_0 * psButtonFlags.BUTTON_TITLE_IS_STRING +
psButtonFlags.BUTTON_POS_1 * psButtonFlags.BUTTON_TITLE_CANCEL;

promptOptions.button0Title = nightly.getString("nightly.copyButton.message");

var buttonPressed = nightly.showConfirmEx(promptOptions);
Expand All @@ -351,7 +350,7 @@ insensitiveSort: function(a, b) {

getExtensionList: function(callback) {
try {
Components.utils.import("resource://gre/modules/AddonManager.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm");

AddonManager.getAddonsByTypes(['extension'], function(addons) {
if (!addons.length)
Expand Down Expand Up @@ -557,7 +556,7 @@ toggleCompatibility: function() {
}

try { // import ctypes for determining wether to show crashme menu item
Components.utils.import("resource://gre/modules/ctypes.jsm");
Components.utils.import("resource://gre/modules/ctypes.jsm");
}
catch(e) {}

Expand Down
1 change: 0 additions & 1 deletion extension/chrome/content/platform.js
Expand Up @@ -5,4 +5,3 @@
var nightlyplatform = {
eol: "\n"
}

34 changes: 17 additions & 17 deletions extension/chrome/content/screenshot/multipartFormData.js
@@ -1,7 +1,7 @@
/* 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/. */

var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
Expand Down Expand Up @@ -74,16 +74,16 @@ getPostData: function()
{
if (this.postdata)
return this.postdata;

var data = "";

for (var name in this.controls)
{
data+="\r\n--"+this.boundary+"\r\n";
data+="Content-Disposition: form-data; name=\""+name+"\"\r\n\r\n";
data+=this.controls[name];
}

for (var name in this.files)
{
var filedata = this.files[name];
Expand All @@ -93,16 +93,16 @@ getPostData: function()
if (filedata.source)
{
data+="Content-Transfer-Encoding: base64\r\n\r\n";

var fis = Cc["@mozilla.org/network/file-input-stream;1"]
.createInstance(Ci.nsIFileInputStream);
fis.init(filedata.source, 1, 384, Ci.nsIFileInputStream.CLOSE_ON_EOF);

var bis = Cc["@mozilla.org/binaryinputstream;1"]
.createInstance(Ci.nsIBinaryInputStream);
bis.setInputStream(fis);
//TODO this isnt needed as yet

// TODO this isnt needed as yet
}
else
{
Expand All @@ -121,43 +121,43 @@ getPostData: function()

this.length = data.length-2;
this.postdata = data;

return data;
},

getPostDataStream: function()
{
return NTT_MakeStream(this.getPostData());
},

getHeaders: function()
{
if (!this.length)
this.getPostData();

var headers = "";
headers+="Content-Type: "+this.getContentType()+"\r\n";
headers+="Content-Length: "+this.length+"\r\n";
return headers;
},

getHeaderStream: function()
{
return NTT_MakeStream(this.getHeaders());
},

getContentType: function()
{
return "multipart/form-data; boundary=\""+this.boundary+"\"";
},

addControl: function(name, value)
{
this.controls[name]=value;
this.postdata = null;
this.length = null;
},

addFile: function(name, contenttype, file)
{
throw Components.results.NS_NOT_IMPLEMENTED;
Expand All @@ -170,7 +170,7 @@ addFile: function(name, contenttype, file)
this.postdata = null;
this.length = null;
},

addFileData: function(name, filename, contenttype, encoding, data)
{
var filedata = {
Expand Down
14 changes: 7 additions & 7 deletions extension/chrome/content/screenshot/providers.js
Expand Up @@ -5,24 +5,24 @@
var Providers = {
_providers: [],
_selected: null,

addProvider: function(provider)
{
this._providers.push(provider);
if (this._selected == null)
this._selected = provider;
},

selectProvider: function(provider)
{
this._selected = provider;
},

getSelectedProvider: function()
{
return this._selected;
},

getProviders: function()
{
return this._providers;
Expand All @@ -39,17 +39,17 @@ var ImageShack = {
formdata.addControl("brand", "");
formdata.addControl("optsize", "320x320");
},

getFileFormField: function()
{
return "fileupload";
},

getReferer: function()
{
return "http://www.imageshack.us/";
},

getSubmissionURL: function()
{
return "http://www.imageshack.us/";
Expand Down

0 comments on commit dabd430

Please sign in to comment.