Skip to content

Commit

Permalink
Updates for Firefox 1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispederick committed Mar 4, 2014
1 parent c0e87ce commit e668823
Show file tree
Hide file tree
Showing 32 changed files with 961 additions and 38 deletions.
18 changes: 18 additions & 0 deletions .csslintrc
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"adjoining-classes": false,
"box-model": false,
"box-sizing": false,
"compatible-vendor-prefixes": false,
"duplicate-background-images": false,
"floats": false,
"font-sizes": false,
"ids": false,
"important": false,
"known-properties": false,
"qualified-headings": false,
"overqualified-elements": false,
"regex-selectors": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ build/opera/
build/web-developer-chrome.zip build/web-developer-chrome.zip
build/web-developer-firefox.xpi build/web-developer-firefox.xpi
build/web-developer-opera.nex build/web-developer-opera.nex
merge merge/
node_modules/
32 changes: 32 additions & 0 deletions .jscs.json
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"disallowDanglingUnderscores": true,
"disallowEmptyBlocks": true,
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowRightStickedOperators": ["?", "+", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterKeywords": ["case", "catch", "default", "for", "if", "switch", "while"],
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": ["case", "catch", "default", "else", "for", "if", "return", "switch", "try", "while"],
"requireDotNotation": true,
"requireKeywordsOnNewLine": ["else"],
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true,
"requireOperatorBeforeLineBreak": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpacesInsideObjectBrackets": "all",
"validateIndentation": 2
}
44 changes: 44 additions & 0 deletions .jshintrc
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"browser": true,
"curly": true,
//"eqeqeq": true,
"evil": true,
"forin": true,
"freeze": true,
"indent": 2,
"jquery": true,
"latedef": true,
//"maxcomplexity": 5,
//"maxdepth": 2,
//"maxparams": 3,
//"maxstatements": 15,
"noarg": true,
"noempty": true,
"nonew": true,
//"quotmark": "double",
"trailing": true,
"undef": true,
"unused": true,
"globals":
{
"BrowserPageInfo": true,
"BrowserReload": true,
"BrowserViewSourceOfDocument": true,
"chrome": true,
"CodeMirror": true,
"Components": true,
"CSSPrimitiveValue": true,
"gDevToolsBrowser": true,
"getWebNavigation": true,
"HTMLDocument": true,
"ich": true,
"inspectDOMDocument": true,
"js_beautify": true,
"pref": true,
"toJavaScriptConsole": true,
"WebDeveloper": true,
"WebDeveloperApplication": true,
"WebDeveloperValidateCSS": true,
"WebDeveloperValidateHTML": true
}
}
36 changes: 36 additions & 0 deletions Gruntfile.js
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = function(grunt)
{
// Configuration
grunt.initConfig(
{
csslint:
{
src: ['source/**/*.css', '!source/common/style-sheets/common/bootstrap/*.css', '!source/common/style-sheets/common/codemirror/*.css'],
options: { csslintrc: '.csslintrc' }
},
jshint:
{
files: ['source/**/*.js', '!source/chrome/javascript/common/jquery/*.js', '!source/common/javascript/common/bootstrap/*.js', '!source/common/javascript/common/codemirror/*.js', '!source/common/javascript/common/jquery/*.js', '!source/common/javascript/generated/beautify/*.js'],
options:
{
force: true,
jshintrc: '.jshintrc'
}
},
jscs:
{
files: ['source/**/*.js', '!source/chrome/javascript/common/jquery/*.js', '!source/common/javascript/common/bootstrap/*.js', '!source/common/javascript/common/codemirror/*.js', '!source/common/javascript/common/jquery/*.js', '!source/common/javascript/generated/beautify/*.js'],
options:
{
config: '.jscs.json',
force: true
//"validateQuoteMarks": "\""
}
},
});

require('load-grunt-tasks')(grunt);

// Default tasks
grunt.registerTask('default', ['newer:csslint', 'newer:jscs', 'newer:jshint']);
};
2 changes: 1 addition & 1 deletion configuration/chrome/configuration.properties
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
common.prefix= common.prefix=
description=Adds a toolbar button with various web developer tools. The official port of the Web Developer extension for Firefox. description=Adds a toolbar button with various web developer tools. The official port of the Web Developer extension for Firefox.
version=0.4.5 version=0.4.6
1 change: 1 addition & 0 deletions configuration/firefox/chrome.manifest
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ locale web-developer de locale/de/
locale web-developer fr locale/fr/ locale web-developer fr locale/fr/
locale web-developer ja-JP locale/ja-JP/ locale web-developer ja-JP locale/ja-JP/
locale web-developer pl-PL locale/pl-PL/ locale web-developer pl-PL locale/pl-PL/
locale web-developer pt-BR locale/pt-BR/
locale web-developer sv-SE locale/sv-SE/ locale web-developer sv-SE locale/sv-SE/
locale web-developer zh-CN locale/zh-CN/ locale web-developer zh-CN locale/zh-CN/
overlay chrome://browser/content/browser.xul chrome://web-developer/content/overlay/overlay.xul overlay chrome://browser/content/browser.xul chrome://web-developer/content/overlay/overlay.xul
Expand Down
2 changes: 1 addition & 1 deletion configuration/opera/configuration.properties
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
common.prefix= common.prefix=
description=Adds a toolbar button with various web developer tools. The official port of the Web Developer extension for Firefox. description=Adds a toolbar button with various web developer tools. The official port of the Web Developer extension for Firefox.
version=0.1 version=0.2
12 changes: 12 additions & 0 deletions package.json
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "web-developer",
"version": "1.0.0",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-csslint": "~0.2.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-jscs-checker": "~0.3.2",
"grunt-newer": "~0.6.0",
"load-grunt-tasks": "~0.3.0"
}
}
2 changes: 1 addition & 1 deletion source/common/javascript/common/css.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ WebDeveloper.CSS.formatStyleValue = function(styleValue)
// Returns an array of style sheets imported in the given style sheet // Returns an array of style sheets imported in the given style sheet
WebDeveloper.CSS.getImportedStyleSheets = function(styleSheet) WebDeveloper.CSS.getImportedStyleSheets = function(styleSheet)
{ {
var styleSheets = []; var styleSheets = [];


// If the style sheet is set // If the style sheet is set
if(styleSheet) if(styleSheet)
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ WebDeveloper.Generated.initialize = function(data, locale)


childElement.appendChild(document.createTextNode(layoutDescription)); childElement.appendChild(document.createTextNode(layoutDescription));
childElement.setAttribute("href", "#" + anchor); childElement.setAttribute("href", "#" + anchor);
element.appendChild(childElement);
filesDropdownMenu.appendChild(element); filesDropdownMenu.appendChild(element);
} }


Expand Down
4 changes: 2 additions & 2 deletions source/common/style-sheets/dashboard/element-information.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/common/style-sheets/generated/common.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ h2:target, h3:target { margin-top: -50px; padding-top: 50px; }
h3 > i { cursor: pointer; margin-right: 5px; } h3 > i { cursor: pointer; margin-right: 5px; }
pre { overflow: auto; white-space: pre; } pre { overflow: auto; white-space: pre; }
#web-developer-syntax-highlighting-dropdown i { margin-right: 5px; } #web-developer-syntax-highlighting-dropdown i { margin-right: 5px; }
.CodeMirror { border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); margin-bottom: 30px; } .CodeMirror { border-color: #000; border-color: rgba(0, 0, 0, 0.15); border-style: solid; border-width: 1px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); margin-bottom: 30px; }
.dropdown-menu { min-width: 360px; max-width: 480px; } .dropdown-menu { min-width: 360px; max-width: 480px; }
.dropdown-menu a { white-space: normal; } .dropdown-menu a { white-space: normal; }
.help-block:empty { display: none; } .help-block:empty { display: none; }
Expand Down
4 changes: 2 additions & 2 deletions source/common/style-sheets/toolbar/ruler.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/firefox/javascript/application/application.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ WebDeveloperApplication.prototype.createSourceFile = function(temporaryDirectory
// If the URL has a file extension // If the URL has a file extension
if(url.fileExtension) if(url.fileExtension)
{ {
fileExtension = url.fileExtension; fileExtension = url.fileExtension;
} }


temporaryDirectory.append("webdeveloper-" + fileName + "-" + new Date().getTime() + "." + fileExtension); temporaryDirectory.append("webdeveloper-" + fileName + "-" + new Date().getTime() + "." + fileExtension);
Expand Down
2 changes: 1 addition & 1 deletion source/firefox/javascript/common/common.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ WebDeveloper.Common.getFileFromCache = function(url, callback)
cacheSession.asyncOpenCacheEntry(url, Components.interfaces.nsICache.ACCESS_READ, cacheSession.asyncOpenCacheEntry(url, Components.interfaces.nsICache.ACCESS_READ,
{ {
// Handles the cache entry being available // Handles the cache entry being available
onCacheEntryAvailable: function(descriptor, accessGranted, status) onCacheEntryAvailable: function(descriptor)
{ {
callback(descriptor); callback(descriptor);
} }
Expand Down
1 change: 1 addition & 0 deletions source/firefox/javascript/dashboard/html/common.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ WebDeveloper.Dashboard.initializeSyntaxHighlight = function(type, color)
{ {
WebDeveloper.Dashboard.editor = CodeMirror.fromTextArea($("#web-developer-content").get(0), WebDeveloper.Dashboard.editor = CodeMirror.fromTextArea($("#web-developer-content").get(0),
{ {
onFocus: function() { window.focus(); },
lineNumbers: true, lineNumbers: true,
mode: type, mode: type,
onCursorActivity: function() onCursorActivity: function()
Expand Down
52 changes: 28 additions & 24 deletions source/firefox/javascript/dashboard/style-information.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -98,37 +98,41 @@ WebDeveloper.StyleInformation.displayStyleInformation = function(element)
// Loop through the style sheets // Loop through the style sheets
for(styleSheet in styleSheets) for(styleSheet in styleSheets)
{ {
childElement = generatedDocument.createElement("i"); // Filter unwanted properties
headingElement = generatedDocument.createElement("h3"); if(styleSheets.hasOwnProperty(styleSheet))

childElement.setAttribute("class", "icon-caret-down");
headingElement.appendChild(childElement);

// If this is the embedded style sheet
if(styleSheet == "web-developer-embedded")
{
headingElement.appendChild(generatedDocument.createTextNode(WebDeveloper.Locales.getString("embeddedStyles")));
}
else
{ {
childElement = generatedDocument.createElement("a"); childElement = generatedDocument.createElement("i");
headingElement = generatedDocument.createElement("h3");


childElement.appendChild(generatedDocument.createTextNode(styleSheet)); childElement.setAttribute("class", "icon-caret-down");
childElement.setAttribute("href", styleSheet);
headingElement.appendChild(childElement); headingElement.appendChild(childElement);
}


styleInformation.appendChild(headingElement); // If this is the embedded style sheet
if(styleSheet == "web-developer-embedded")
{
headingElement.appendChild(generatedDocument.createTextNode(WebDeveloper.Locales.getString("embeddedStyles")));
}
else
{
childElement = generatedDocument.createElement("a");

childElement.appendChild(generatedDocument.createTextNode(styleSheet));
childElement.setAttribute("href", styleSheet);
headingElement.appendChild(childElement);
}


childElement = generatedDocument.createElement("pre"); styleInformation.appendChild(headingElement);


childElement.appendChild(generatedDocument.createTextNode(styleSheets[styleSheet].trim())); childElement = generatedDocument.createElement("pre");
childElement.setAttribute("class", "web-developer-syntax-highlight");
childElement.setAttribute("data-line-numbers", "false"); childElement.appendChild(generatedDocument.createTextNode(styleSheets[styleSheet].trim()));
childElement.setAttribute("data-type", "css"); childElement.setAttribute("class", "web-developer-syntax-highlight");
styleInformation.appendChild(childElement); childElement.setAttribute("data-line-numbers", "false");
childElement.setAttribute("data-type", "css");
styleInformation.appendChild(childElement);


noStyleInformation = false; noStyleInformation = false;
}
} }


// If no style information was found // If no style information was found
Expand Down
4 changes: 2 additions & 2 deletions source/firefox/javascript/overlay/disable.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ WebDeveloper.Overlay.Disable.toggleMinimumFontSize = function(element)
// Toggles the page colors // Toggles the page colors
WebDeveloper.Overlay.Disable.togglePageColors = function(element) WebDeveloper.Overlay.Disable.togglePageColors = function(element)
{ {
WebDeveloper.Preferences.enablePreference(element, "browser.display.use_document_colors"); WebDeveloper.Preferences.enablePreference(element, "browser.display.use_document_colors");
BrowserReload(); BrowserReload();
}; };


// Toggles the proxy settings // Toggles the proxy settings
Expand Down
2 changes: 1 addition & 1 deletion source/firefox/javascript/overlay/overlay.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ WebDeveloper.Overlay.updateRenderMode = function()
// If the toolbar is in text mode // If the toolbar is in text mode
if(WebDeveloper.Preferences.getExtensionStringPreference("toolbar.icons") == "text") if(WebDeveloper.Preferences.getExtensionStringPreference("toolbar.icons") == "text")
{ {
renderModeButton.setAttribute("label", WebDeveloper.Locales.getString("quirksModeLabel")); renderModeButton.setAttribute("label", WebDeveloper.Locales.getString("quirksModeLabel"));
} }
} }
else else
Expand Down
16 changes: 16 additions & 0 deletions source/firefox/locales/pt-BR/dashboard/dashboard.dtd
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,16 @@
<!ENTITY webdeveloper.clear "Limpar">
<!ENTITY webdeveloper.dark "Dark">
<!ENTITY webdeveloper.light "Light">
<!ENTITY webdeveloper.none "None">
<!ENTITY webdeveloper.reset "Restaurar">
<!ENTITY webdeveloper.save "Salvar…">
<!ENTITY webdeveloper.search "Procurar">
<!ENTITY webdeveloper.search.label "Procurar:">
<!ENTITY webdeveloper.syntax.highlighting "Syntax Highlighting">
<!ENTITY webdeveloper.element.information "Informação do elemento">
<!ENTITY webdeveloper.style.information "Informação do estilo">
<!ENTITY webdeveloper.edit.css "Editar CSS">
<!ENTITY webdeveloper.open "Abrir…">
<!ENTITY webdeveloper.pin.css "Fixar CSS">
<!ENTITY webdeveloper.edit.html "Editar HTML">
<!ENTITY webdeveloper.html.body "Corpo do HTML">
24 changes: 24 additions & 0 deletions source/firefox/locales/pt-BR/dashboard/dashboard.properties
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,24 @@
ancestors=Ancestrais
attribute=Atributo
children=Filhos
dom=DOM
layout=Layout
position=Posição
text=Texto
value=Valor
ancestorPathCopied=O caminho do ancestral foi copiado para a área de transferência.
copyAncestorPath=Copiar caminho do ancestral
elementInformation=Informação do elemento
selectAnElementDisplayInformation=Selecione um elemento para exibir as informações sobre ele
inlineStyles=Estilos inline
line=Linha
noStyleInformation=Nenhuma informação de estilo
selectAnElementDisplayStyles=Selecione um elemento para exibir os estilos aplicados a ele
editCSS=Editar CSS
embeddedStyles=Estilos incorporados
openStyleSheet=Abrir folha de estilo
pinCSS=Fixar CSS
saveStyleSheet=Salvar folha de estilo
styleSheetDescription=Arquivos de folha de estilo
unpinCSS=Desfixar CSS
saveHTML=Salvar HTML
8 changes: 8 additions & 0 deletions source/firefox/locales/pt-BR/dialogs/cookie.dtd
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,8 @@
<!ENTITY webdeveloper.add.cookie "Adicionar cookie">
<!ENTITY webdeveloper.expires.label "Expira:">
<!ENTITY webdeveloper.host.label "Host:">
<!ENTITY webdeveloper.name.label "Nome:">
<!ENTITY webdeveloper.path.label "Caminho:">
<!ENTITY webdeveloper.secure.cookie.label "Cookie de segurança">
<!ENTITY webdeveloper.session.cookie.label "Cookie de sessão">
<!ENTITY webdeveloper.value.label "Valor:">
1 change: 1 addition & 0 deletions source/firefox/locales/pt-BR/dialogs/cookie.properties
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1 @@
addCookieError=Erro ao adicionar cookie
2 changes: 2 additions & 0 deletions source/firefox/locales/pt-BR/dialogs/message.dtd
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,2 @@
<!ENTITY webdeveloper.message.title "Web Developer">
<!ENTITY webdeveloper.more.information "Mais informações…">
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,7 @@
<!ENTITY webdeveloper.element.1 "Elemento 1">
<!ENTITY webdeveloper.element.2 "Elemento 2">
<!ENTITY webdeveloper.element.3 "Elemento 3">
<!ENTITY webdeveloper.element.4 "Elemento 4">
<!ENTITY webdeveloper.element.5 "Elemento 5">
<!ENTITY webdeveloper.outline.custom.elements "Destacar elementos personalizados">
<!ENTITY webdeveloper.outline.custom.elements.description "Informe os elementos a destacar (por exemplo, div) e as cores a usar">
4 changes: 4 additions & 0 deletions source/firefox/locales/pt-BR/dialogs/resize-window.dtd
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,4 @@
<!ENTITY webdeveloper.width "Largura:">
<!ENTITY webdeveloper.height "Altura:">
<!ENTITY webdeveloper.resize.viewport "Redimensionar a área de visualização (viewport)">
<!ENTITY webdeveloper.resize.window "Redimensionar a janela">
Loading

0 comments on commit e668823

Please sign in to comment.