Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CSS-Tricks/The-Printliminator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dist/chrome')
-rw-r--r--dist/chrome/_locales/en/messages.json4
-rw-r--r--dist/chrome/_locales/fr/messages.json198
-rw-r--r--dist/chrome/manifest.json2
-rw-r--r--dist/chrome/popup.css4
-rw-r--r--dist/chrome/popup.html18
-rw-r--r--dist/chrome/popup.js17
-rw-r--r--dist/chrome/printliminator.js30
7 files changed, 238 insertions, 35 deletions
diff --git a/dist/chrome/_locales/en/messages.json b/dist/chrome/_locales/en/messages.json
index a55de73..8047022 100644
--- a/dist/chrome/_locales/en/messages.json
+++ b/dist/chrome/_locales/en/messages.json
@@ -39,6 +39,10 @@
"message" : "View Keyboard Commands",
"description" : "Open a list of keyboard commands"
},
+ "hideKeyboardCommands" : {
+ "message" : "Hide Keyboard Commands",
+ "description" : "Close list of keyboard commands"
+ },
"keyColumn" : {
"message" : "Key",
"description" : "Key name column"
diff --git a/dist/chrome/_locales/fr/messages.json b/dist/chrome/_locales/fr/messages.json
new file mode 100644
index 0000000..5697c0e
--- /dev/null
+++ b/dist/chrome/_locales/fr/messages.json
@@ -0,0 +1,198 @@
+{
+ "printliminatorName" : {
+ "message" : "The Printliminator",
+ "description" : "Extension name"
+ },
+ "printliminatorDescription" : {
+ "message" : "Un outil simple pour améliorer l’impression des sites web.",
+ "description" : "Extension Description"
+ },
+ "commandButtons" : {
+ "message" : "Outils",
+ "description" : "Command buttons: undo, stylize, remove graphics & print"
+ },
+ "clickToRemove" : {
+ "message" : "Cliquez sur les élément de la page pour les faire disparaitre",
+ "description" : "Click highlight to remove item"
+ },
+ "altClickRemove" : {
+ "message" : "Alt-cliquez sur un élément pour ne garder que lui",
+ "description" : "Alt-click highlight to remove everything expect the item"
+ },
+ "undoLast" : {
+ "message" : "Annuler",
+ "description" : "Undo the last action"
+ },
+ "addStylize" : {
+ "message" : "Supprimer<br>les styles",
+ "description" : "Add print stylesheet"
+ },
+ "removeGraphics" : {
+ "message" : "Supprimer<br>les images",
+ "description" : "Removes all images, iframes and video from the page"
+ },
+ "sendToPrint" : {
+ "message" : "Lancer<br>l’impression",
+ "description" : "Print the page"
+ },
+ "viewKeyboardCommands" : {
+ "message" : "Voir les raccourcis clavier",
+ "description" : "Open a list of keyboard commands"
+ },
+ "hideKeyboardCommands" : {
+ "message" : "Masquer les raccourcis clavier",
+ "description" : "Close list of keyboard commands"
+ },
+ "keyColumn" : {
+ "message" : "Touche",
+ "description" : "Key name column"
+ },
+ "descriptionColumn" : {
+ "message" : "Description",
+ "description" : "Description of key action"
+ },
+ "orText" : {
+ "message" : "ou",
+ "description" : "or text"
+ },
+ "keyPageUp" : {
+ "message" : "PagePrec",
+ "description" : "Page up key"
+ },
+ "keyUpArrow" : {
+ "message" : "Flèche haut",
+ "description" : "Up arrow key text added to title"
+ },
+ "upDescription" : {
+ "message" : "Sélectionner l’élement parent",
+ "description" : "Find parent element of current highlight"
+ },
+ "keyPageDown" : {
+ "message" : "PageSuiv",
+ "description" : "Page down key"
+ },
+ "keyDownArrow" : {
+ "message" : "Flèche bas",
+ "description" : "Down arrow key text added to title"
+ },
+ "downDescription" : {
+ "message" : "Sélectionner l’élément enfant",
+ "description" : "Find first visible child element of highlight"
+ },
+ "keyRightArrow" : {
+ "message" : "Flèche droite",
+ "description" : "Right arrow text added to title"
+ },
+ "rightDescription" : {
+ "message" : "Sélectionner l’élément suivant",
+ "description" : "Find next visible sibling element of highlight"
+ },
+ "keyLeftArrow" : {
+ "message" : "Flèche Gauche",
+ "description" : "Left arrow text added to title"
+ },
+ "leftDescription" : {
+ "message" : "Sélectionner l’élément précédent",
+ "description" : ""
+ },
+ "keyEnter" : {
+ "message" : "Entrer",
+ "description" : "Press enter to remove highlight"
+ },
+ "removeHighlight" : {
+ "message" : "Supprimer l’élément sélectionner",
+ "description" : "Remove highlighted box"
+ },
+ "keyBackspace" : {
+ "message" : "Retour arrière",
+ "description" : "Press backspace to undo last action"
+ },
+ "undoAction" : {
+ "message" : "Annuler",
+ "description" : "Undo last action"
+ },
+ "keyNumpad" : {
+ "message" : "Pavé num.",
+ "description" : "Numpad key text description"
+ },
+ "keyNumpadPlus" : {
+ "message" : "Plus (pavé numérique)",
+ "description" : "Numpad+ key"
+ },
+ "fontUp" : {
+ "message" : "Augmenter la taille des caractères",
+ "description" : "Use keyNumpad+ to increase font size"
+ },
+ "keyNumpadMinus" : {
+ "message" : "Moins Plus (pavé numérique)",
+ "description" : "Numpad- key"
+ },
+ "fontDown" : {
+ "message" : "Réduire la taille des caractères",
+ "description" : "Use keyNumpad- to decrease font size"
+ },
+ "keyNumpadAsterisk" : {
+ "message" : "Étoile (pavé numérique",
+ "description" : ""
+ },
+ "fontReset" : {
+ "message" : "Réinitialiser la taille des caractères",
+ "description" : "Reset font size to original"
+ },
+ "mouseLeftClick" : {
+ "message" : "click gauche",
+ "description" : "left mouse click"
+ },
+ "keyAlt" : {
+ "message" : "Alt",
+ "description" : "Alt-key used with mouse-click"
+ },
+ "removeOpposite" : {
+ "message" : "Ne garder que l’élément sélectionne",
+ "description" : "Remove opposite of highlight"
+ },
+ "keyShift" : {
+ "message" : "Shift",
+ "description" : "Shift-key used with mouse-click"
+ },
+ "fullWidth" : {
+ "message" : "Appliquer une largeur de 100% et supprimer les marges (le contour de sélection devient bleu)",
+ "description" : "Make highlighted element full width & add blue outline"
+ },
+ "keyF1" : {
+ "message" : "F1",
+ "description" : "F1 key name"
+ },
+ "keyF1Title" : {
+ "message" : "Touche F1",
+ "description" : "F1 key used to toggle messages"
+ },
+ "toggleMessages" : {
+ "message" : "Afficher/masquer le message d'action",
+ "description" : "Action message display is toggled by the F1 key"
+ },
+ "keyPS" : {
+ "message" : "ImprEcrn",
+ "description" : "Print Screen key (abbreviation)"
+ },
+ "keyPSTitle" : {
+ "message" : "Imprime Écran",
+ "description" : "Print Screen key full name added to title"
+ },
+ "printPage" : {
+ "message" : "Imprimer la page",
+ "description" : "Print the current page"
+ },
+ "keyEsc" : {
+ "message" : "Esc",
+ "description" : "Escape key to close Printliminator"
+ },
+ "keyEscTitle" : {
+ "message" : "Échap",
+ "description" : "Escape key full name"
+ },
+ "abort" : {
+ "message" : "Désactiver Printliminator en conservant l’historique d'annulation",
+ "description" : "Disable Printliminator, but save undo history."
+ }
+}
diff --git a/dist/chrome/manifest.json b/dist/chrome/manifest.json
index ee6ba57..1d4a932 100644
--- a/dist/chrome/manifest.json
+++ b/dist/chrome/manifest.json
@@ -1,6 +1,6 @@
{
"name": "__MSG_printliminatorName__",
- "version": "4.0.4",
+ "version": "4.0.5",
"manifest_version": 2,
"author": "Chris Coyier",
"description": "__MSG_printliminatorDescription__",
diff --git a/dist/chrome/popup.css b/dist/chrome/popup.css
index 6a4d51c..dbb7093 100644
--- a/dist/chrome/popup.css
+++ b/dist/chrome/popup.css
@@ -73,15 +73,15 @@ li {
vertical-align: middle;
padding: 4px 16px 4px 4px;
white-space: nowrap;
- margin: 2px;
cursor: pointer;
+ max-width: 23%;
+ overflow: hidden;
}
li:hover {
background: #444;
}
.icon {
- display: inline-block;
background: url(printliminator.png) no-repeat;
width: 25px;
height: 25px;
diff --git a/dist/chrome/popup.html b/dist/chrome/popup.html
index 88af862..bfac373 100644
--- a/dist/chrome/popup.html
+++ b/dist/chrome/popup.html
@@ -52,21 +52,17 @@
<section>
<h3 i18n-text="commandButtons"></h3>
<ul>
- <li class="undo">
+ <li class="first undo" i18n-title="undoLast" i18n-text="undoLast">
<span class="icon"></span>
- <span i18n-text="undoLast"></span>
</li>
- <li class="stylize">
+ <li class="stylize" i18n-title="addStylize" i18n-text="addStylize">
<span class="icon"></span>
- <span i18n-text="addStylize"></span>
</li>
- <li class="no_graphics">
+ <li class="no_graphics" i18n-title="removeGraphics" i18n-text="removeGraphics">
<span class="icon"></span>
- <span i18n-text="removeGraphics"></span>
</li>
- <li class="print">
+ <li class="last print" i18n-title="sendToPrint" i18n-text="sendToPrint">
<span class="icon"></span>
- <span i18n-text="sendToPrint"></span>
</li>
</ul>
<div class="commands-wrap">
@@ -108,15 +104,15 @@
<td i18n-text="undoAction">n</td>
</tr>
<tr>
- <td><kbd i18n-title="keyNumpadPlus"><span i18n-text="keyNumpad"></span> <span class="bold">+</span></kbd></td>
+ <td><kbd i18n-title="keyNumpadPlus"><span i18n-text="keyNumpad"></span> <span class="bold">+</span></kbd> <span class="lower" i18n-text="orText"></span> <kbd>+</kbd></td>
<td i18n-text="fontUp"></td>
</tr>
<tr>
- <td><kbd i18n-title="keyNumpadMinus"><span i18n-text="keyNumpad"></span> <span class="bold">-</span></kbd></td>
+ <td><kbd i18n-title="keyNumpadMinus"><span i18n-text="keyNumpad"></span> <span class="bold">-</span></kbd> <span class="lower" i18n-text="orText"></span> <kbd>-</kbd></td>
<td i18n-text="fontDown"></td>
</tr>
<tr>
- <td><kbd i18n-title="keyNumpadAsterisk"><span i18n-text="keyNumpad"></span> <span class="bold asterisk">*</span></kbd></td>
+ <td><kbd i18n-title="keyNumpadAsterisk"><span i18n-text="keyNumpad"></span> <span class="bold asterisk">*</span></kbd> <span class="lower" i18n-text="orText"></span> <kbd>*</kbd></td>
<td i18n-text="fontReset"></td>
</tr>
<tr>
diff --git a/dist/chrome/popup.js b/dist/chrome/popup.js
index 75efc84..7a3068b 100644
--- a/dist/chrome/popup.js
+++ b/dist/chrome/popup.js
@@ -53,8 +53,7 @@ var commands = {
table = document.querySelector( '#keyboard' ),
mode = table.style.display === 'none';
table.style.display = mode ? '' : 'none';
- this.innerHTML = ( mode ? 'Hide' : 'View' ) + ' Keyboard Commands';
-
+ this.innerHTML = chrome.i18n.getMessage( mode ? 'hideKeyboardCommands' : 'viewKeyboardCommands' );
},
undo : function() {
chrome.tabs.executeScript( null, {
@@ -63,19 +62,19 @@ var commands = {
},
setLanguage : function(){
// update all text content
- commands.getMsg( document.querySelectorAll( '[i18n-text]' ), true );
- commands.getMsg( document.querySelectorAll( '[i18n-title]' ), false );
+ commands.getMsg( document.querySelectorAll( '[i18n-text]' ), 'text' );
+ commands.getMsg( document.querySelectorAll( '[i18n-title]' ), 'title' );
},
- getMsg : function( elms, isText ) {
+ getMsg : function( elms, target ) {
var indx, msgKey, message,
len = elms.length;
for ( indx = 0; indx < len; indx++ ) {
- msgKey = elms[ indx ].getAttribute( 'i18n-' + ( isText ? 'text' : 'title' ) );
+ msgKey = elms[ indx ].getAttribute( 'i18n-' + target );
message = chrome.i18n.getMessage( msgKey );
- if ( isText ) {
- elms[ indx ].innerHTML = message;
+ if ( target === 'text' ) {
+ elms[ indx ].innerHTML += message;
} else {
- elms[ indx ].title = message;
+ elms[ indx ].title = message.replace( '<br>', ' ' );
}
}
}
diff --git a/dist/chrome/printliminator.js b/dist/chrome/printliminator.js
index 2ba581f..2711e5a 100644
--- a/dist/chrome/printliminator.js
+++ b/dist/chrome/printliminator.js
@@ -1,4 +1,4 @@
-/* Printliminator v4.0.4
+/* Printliminator v4.0.5
* https://github.com/CSS-Tricks/The-Printliminator
*/
/*jshint expr:false */
@@ -8,7 +8,7 @@
var pl = window.thePrintliminator = {
- version : '4.0.4',
+ version : '4.0.5',
// preprocess is used to echo in settings from options.json
css : {
@@ -26,10 +26,10 @@ var pl = window.thePrintliminator = {
// message options
messageOptions : {
- show : undefined, // show messages (F1 to toggle)
- limit : undefined, // messages on screen
- fade : undefined, // message fadeout (ms)
- duration : undefined // message visible (ms)
+ show : true, // show messages (F1 to toggle)
+ limit : 6, // messages on screen
+ fade : 300, // message fadeout (ms)
+ duration : 4000 // message visible (ms)
},
messages : {
@@ -62,9 +62,12 @@ var pl = window.thePrintliminator = {
prevSib : 37, // left arrow
hide : 13, // enter
undo : 8, // backspace
- fontUp : 107, // Numpad +
- fontDown : 109, // Numpad -
- fontReset : 106, // Numpad *
+ fontUp1 : 107, // Numpad +
+ fontUp2 : 187, // = (unshifted +)
+ fontDown1 : 109, // Numpad -
+ fontDown2 : 189, // -
+ fontReset1: 106, // Numpad *
+ fontReset2: 56, // 8 (unshifted *)
print : 44, // PrtScn (keyup only)
abort : 27, // Esc
@@ -274,17 +277,20 @@ var pl = window.thePrintliminator = {
suffix = n.match( /[a-z]+/i )[0];
switch ( event.which ) {
- case pl.keys.fontUp : // Numpad + = Increase font size
+ case pl.keys.fontUp1 : // Numpad + = Increase font size
+ case pl.keys.fontUp2 : // = (unshifted +)
body.style.fontSize = ( parseFloat( n ) + 1 ) + suffix;
pl.showMessage( msg.fontUp + body.style.fontSize );
break;
- case pl.keys.fontDown : // Numpad - = Decrease font size
+ case pl.keys.fontDown1 : // Numpad - = Decrease font size
+ case pl.keys.fontDown2 : // -
body.style.fontSize = ( parseFloat( n ) - 1 ) + suffix;
pl.showMessage( msg.fontDown + body.style.fontSize );
break;
- case pl.keys.fontReset : // Numpad * = reset font-size
+ case pl.keys.fontReset1 : // Numpad * = reset font-size
+ case pl.keys.fontReset2 : // 8 (unshifted *)
body.style.fontSize = '';
pl.showMessage( msg.fontReset );
break;