1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 08:08:07 +02:00

Enable the spaced-comment ESLint rule

Please see http://eslint.org/docs/rules/spaced-comment.

Note that the exceptions added for `line` comments are intended to still allow use of the old preprocessor without linting errors.
Also, I took the opportunity to improve the grammar slightly (w.r.t. capitalization and punctuation) for comments touched in the patch.
This commit is contained in:
Jonas Jenwald 2017-01-19 16:26:32 +01:00
parent a917443ae6
commit 4626fc8342
14 changed files with 53 additions and 47 deletions

View file

@ -280,7 +280,7 @@ PDFViewerApplication.externalServices = {
},
};
//// l10n.js for Firefox extension expects services to be set.
// l10n.js for Firefox extension expects services to be set.
document.mozL10n.setExternalLocalizerServices({
getLocale: function () {
return FirefoxCom.requestSync('getLocale', null);

View file

@ -285,7 +285,7 @@
window.addEventListener('keydown', function(event) {
// Intercept Cmd/Ctrl + P in all browsers.
// Also intercept Cmd/Ctrl + Shift + P in Chrome and Opera
if (event.keyCode === 80/*P*/ && (event.ctrlKey || event.metaKey) &&
if (event.keyCode === /* P= */ 80 && (event.ctrlKey || event.metaKey) &&
!event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
window.print();
if (hasAttachEvent) {
@ -305,7 +305,7 @@
if (hasAttachEvent) {
document.attachEvent('onkeydown', function(event) {
event = event || window.event;
if (event.keyCode === 80/*P*/ && event.ctrlKey) {
if (event.keyCode === /* P= */ 80 && event.ctrlKey) {
event.keyCode = 0;
return false;
}