Commit 47387f28 authored by Kuo Jen Wei's avatar Kuo Jen Wei Committed by Commit Bot

[CCA] Add eqeqeq rule to eslintrc.

Bug: b/117810572
Test: Pass presubmit check. Pass tast run <DUT> 'camera.CCAUI*'
Change-Id: I7ad44a0d3d78ddd2c4f0d052d0bb6402e2406d1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1886270Reviewed-by: default avatarShik Chen <shik@chromium.org>
Commit-Queue: Kuo Jen Wei <inker@chromium.org>
Auto-Submit: Kuo Jen Wei <inker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714860}
parent 7d5415e8
...@@ -161,6 +161,7 @@ module.exports = { ...@@ -161,6 +161,7 @@ module.exports = {
// Chromium tree. // Chromium tree.
'rules': Object.assign({}, googleRules, { 'rules': Object.assign({}, googleRules, {
'curly': [2, 'multi-line', 'consistent'], 'curly': [2, 'multi-line', 'consistent'],
'eqeqeq': 2,
'no-console': [2, {allow: ['warn', 'error']}], 'no-console': [2, {allow: ['warn', 'error']}],
// We are using 2 spaces before trailing line comments. The option // We are using 2 spaces before trailing line comments. The option
......
...@@ -141,7 +141,7 @@ cca.device.DeviceInfoUpdater = class { ...@@ -141,7 +141,7 @@ cca.device.DeviceInfoUpdater = class {
*/ */
async enumerateDevices_() { async enumerateDevices_() {
const devices = (await navigator.mediaDevices.enumerateDevices()) const devices = (await navigator.mediaDevices.enumerateDevices())
.filter((device) => device.kind == 'videoinput'); .filter((device) => device.kind === 'videoinput');
if (devices.length === 0) { if (devices.length === 0) {
throw new Error('Device list empty.'); throw new Error('Device list empty.');
} }
......
...@@ -113,7 +113,7 @@ cca.App.prototype.setupToggles_ = function() { ...@@ -113,7 +113,7 @@ cca.App.prototype.setupToggles_ = function() {
document.querySelectorAll('input').forEach((element) => { document.querySelectorAll('input').forEach((element) => {
element.addEventListener( element.addEventListener(
'keypress', 'keypress',
(event) => cca.util.getShortcutIdentifier(event) == 'Enter' && (event) => cca.util.getShortcutIdentifier(event) === 'Enter' &&
element.click()); element.click());
var css = element.getAttribute('data-state'); var css = element.getAttribute('data-state');
...@@ -129,7 +129,7 @@ cca.App.prototype.setupToggles_ = function() { ...@@ -129,7 +129,7 @@ cca.App.prototype.setupToggles_ = function() {
} }
if (event.isTrusted) { if (event.isTrusted) {
element.save(); element.save();
if (element.type == 'radio' && element.checked) { if (element.type === 'radio' && element.checked) {
// Handle unchecked grouped sibling radios. // Handle unchecked grouped sibling radios.
var grouped = `input[type=radio][name=${element.name}]:not(:checked)`; var grouped = `input[type=radio][name=${element.name}]:not(:checked)`;
document.querySelectorAll(grouped).forEach( document.querySelectorAll(grouped).forEach(
...@@ -181,7 +181,7 @@ cca.App.prototype.start = function() { ...@@ -181,7 +181,7 @@ cca.App.prototype.start = function() {
}) })
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);
if (error && error.message == 'no-migrate') { if (error && error.message === 'no-migrate') {
chrome.app.window.current().close(); chrome.app.window.current().close();
return; return;
} }
......
...@@ -88,7 +88,7 @@ cca.mojo.DeviceOperator = class { ...@@ -88,7 +88,7 @@ cca.mojo.DeviceOperator = class {
// The data of |streamConfigs| looks like: // The data of |streamConfigs| looks like:
// streamConfigs: [FORMAT_1, WIDTH_1, HEIGHT_1, TYPE_1, // streamConfigs: [FORMAT_1, WIDTH_1, HEIGHT_1, TYPE_1,
// FORMAT_2, WIDTH_2, HEIGHT_2, TYPE_2, ...] // FORMAT_2, WIDTH_2, HEIGHT_2, TYPE_2, ...]
if (streamConfigs.length % numElementPerEntry != 0) { if (streamConfigs.length % numElementPerEntry !== 0) {
throw new Error('Unexpected length of stream configurations'); throw new Error('Unexpected length of stream configurations');
} }
...@@ -129,7 +129,7 @@ cca.mojo.DeviceOperator = class { ...@@ -129,7 +129,7 @@ cca.mojo.DeviceOperator = class {
// minFrameDurationCOnfigs: [FORMAT_1, WIDTH_1, HEIGHT_1, DURATION_1, // minFrameDurationCOnfigs: [FORMAT_1, WIDTH_1, HEIGHT_1, DURATION_1,
// FORMAT_2, WIDTH_2, HEIGHT_2, DURATION_2, // FORMAT_2, WIDTH_2, HEIGHT_2, DURATION_2,
// ...] // ...]
if (minFrameDurationConfigs.length % numElementPerEntry != 0) { if (minFrameDurationConfigs.length % numElementPerEntry !== 0) {
throw new Error('Unexpected length of frame durations configs'); throw new Error('Unexpected length of frame durations configs');
} }
...@@ -181,7 +181,7 @@ cca.mojo.DeviceOperator = class { ...@@ -181,7 +181,7 @@ cca.mojo.DeviceOperator = class {
// The data of |availableFpsRanges| looks like: // The data of |availableFpsRanges| looks like:
// availableFpsRanges: [RANGE_1_MIN, RANGE_1_MAX, // availableFpsRanges: [RANGE_1_MIN, RANGE_1_MAX,
// RANGE_2_MIN, RANGE_2_MAX, ...] // RANGE_2_MIN, RANGE_2_MAX, ...]
if (availableFpsRanges.length % numElementPerEntry != 0) { if (availableFpsRanges.length % numElementPerEntry !== 0) {
throw new Error('Unexpected length of available fps range configs'); throw new Error('Unexpected length of available fps range configs');
} }
...@@ -370,7 +370,7 @@ cca.mojo.DeviceOperator = class { ...@@ -370,7 +370,7 @@ cca.mojo.DeviceOperator = class {
* @return {!Promise<boolean>} True if the DeviceOperator is supported. * @return {!Promise<boolean>} True if the DeviceOperator is supported.
*/ */
static async isSupported() { static async isSupported() {
return await this.getInstance() != null; return await this.getInstance() !== null;
} }
}; };
......
...@@ -60,7 +60,7 @@ var Resolution = class { ...@@ -60,7 +60,7 @@ var Resolution = class {
* @return {boolean} Whether aspect ratio of resolutions are equal. * @return {boolean} Whether aspect ratio of resolutions are equal.
*/ */
aspectRatioEquals(resolution) { aspectRatioEquals(resolution) {
return this.width * resolution.height == this.height * resolution.width; return this.width * resolution.height === this.height * resolution.width;
} }
/** /**
......
...@@ -25,7 +25,7 @@ cca.util.getPhotoOrientation = function(blob) { ...@@ -25,7 +25,7 @@ cca.util.getPhotoOrientation = function(blob) {
let reader = new FileReader(); let reader = new FileReader();
reader.onload = function(event) { reader.onload = function(event) {
let view = new DataView(event.target.result); let view = new DataView(event.target.result);
if (view.getUint16(0, false) != 0xFFD8) { if (view.getUint16(0, false) !== 0xFFD8) {
resolve(1); resolve(1);
return; return;
} }
...@@ -37,22 +37,22 @@ cca.util.getPhotoOrientation = function(blob) { ...@@ -37,22 +37,22 @@ cca.util.getPhotoOrientation = function(blob) {
} }
let marker = view.getUint16(offset, false); let marker = view.getUint16(offset, false);
offset += 2; offset += 2;
if (marker == 0xFFE1) { if (marker === 0xFFE1) {
if (view.getUint32(offset += 2, false) != 0x45786966) { if (view.getUint32(offset += 2, false) !== 0x45786966) {
break; break;
} }
let little = view.getUint16(offset += 6, false) == 0x4949; let little = view.getUint16(offset += 6, false) === 0x4949;
offset += view.getUint32(offset + 4, little); offset += view.getUint32(offset + 4, little);
let tags = view.getUint16(offset, little); let tags = view.getUint16(offset, little);
offset += 2; offset += 2;
for (let i = 0; i < tags; i++) { for (let i = 0; i < tags; i++) {
if (view.getUint16(offset + (i * 12), little) == 0x0112) { if (view.getUint16(offset + (i * 12), little) === 0x0112) {
resolve(view.getUint16(offset + (i * 12) + 8, little)); resolve(view.getUint16(offset + (i * 12) + 8, little));
return; return;
} }
} }
} else if ((marker & 0xFF00) != 0xFF00) { } else if ((marker & 0xFF00) !== 0xFF00) {
break; break;
} else { } else {
offset += view.getUint16(offset, false); offset += view.getUint16(offset, false);
...@@ -119,7 +119,7 @@ cca.util.orientPhoto = function(blob, onSuccess, onFailure) { ...@@ -119,7 +119,7 @@ cca.util.orientPhoto = function(blob, onSuccess, onFailure) {
context.translate(-centerX, -centerY); context.translate(-centerX, -centerY);
let outputCanvas = document.createElement('canvas'); let outputCanvas = document.createElement('canvas');
if (orientation.rotation == 90 || orientation.rotation == 270) { if (orientation.rotation === 90 || orientation.rotation === 270) {
outputCanvas.width = original.height; outputCanvas.width = original.height;
outputCanvas.height = original.width; outputCanvas.height = original.width;
} else { } else {
...@@ -143,7 +143,7 @@ cca.util.orientPhoto = function(blob, onSuccess, onFailure) { ...@@ -143,7 +143,7 @@ cca.util.orientPhoto = function(blob, onSuccess, onFailure) {
}; };
cca.util.getPhotoOrientation(blob).then((orientation) => { cca.util.getPhotoOrientation(blob).then((orientation) => {
if (orientation.rotation == 0 && !orientation.flip) { if (orientation.rotation === 0 && !orientation.flip) {
onSuccess(blob); onSuccess(blob);
} else { } else {
let original = document.createElement('img'); let original = document.createElement('img');
...@@ -209,7 +209,7 @@ cca.util.animateCancel = function(element) { ...@@ -209,7 +209,7 @@ cca.util.animateCancel = function(element) {
cca.util.waitAnimationCompleted = function(element, callback) { cca.util.waitAnimationCompleted = function(element, callback) {
var completed = false; var completed = false;
var onCompleted = (event) => { var onCompleted = (event) => {
if (completed || (event && event.target != element)) { if (completed || (event && event.target !== element)) {
return; return;
} }
completed = true; completed = true;
...@@ -372,8 +372,8 @@ cca.util.SmoothScroller.prototype.scrollTo = function(x, y, mode) { ...@@ -372,8 +372,8 @@ cca.util.SmoothScroller.prototype.scrollTo = function(x, y, mode) {
'translate(' + -dx + 'px, ' + -dy + 'px)'; 'translate(' + -dx + 'px, ' + -dy + 'px)';
// If nothing to change, then return. // If nothing to change, then return.
if (this.padder_.style.webkitTransform == transformString || if (this.padder_.style.webkitTransform === transformString ||
(dx == 0 && dy == 0 && !this.padder_.style.webkitTransform)) { (dx === 0 && dy === 0 && !this.padder_.style.webkitTransform)) {
return; return;
} }
...@@ -390,7 +390,7 @@ cca.util.SmoothScroller.prototype.scrollTo = function(x, y, mode) { ...@@ -390,7 +390,7 @@ cca.util.SmoothScroller.prototype.scrollTo = function(x, y, mode) {
// animation is finished. // animation is finished.
cca.util.waitAnimationCompleted(this.padder_, () => { cca.util.waitAnimationCompleted(this.padder_, () => {
// Check if the animation got invalidated by a later scroll. // Check if the animation got invalidated by a later scroll.
if (currentAnimationId == this.animationId_) { if (currentAnimationId === this.animationId_) {
this.flushScroll_(); this.flushScroll_();
} }
}); });
...@@ -453,8 +453,8 @@ cca.util.PointerTracker.prototype.onMouseMove_ = function(event) { ...@@ -453,8 +453,8 @@ cca.util.PointerTracker.prototype.onMouseMove_ = function(event) {
// Ignore mouse events, which are invoked on the same position, but with // Ignore mouse events, which are invoked on the same position, but with
// changed client coordinates. This will happen eg. when scrolling. We should // changed client coordinates. This will happen eg. when scrolling. We should
// ignore them, since they are not invoked by an actual mouse move. // ignore them, since they are not invoked by an actual mouse move.
if (this.lastMousePosition_ && this.lastMousePosition_[0] == event.screenX && if (this.lastMousePosition_ && this.lastMousePosition_[0] === event.screenX &&
this.lastMousePosition_[1] == event.screenY) { this.lastMousePosition_[1] === event.screenY) {
return; return;
} }
...@@ -649,8 +649,8 @@ cca.util.ScrollTracker.prototype.probe_ = function() { ...@@ -649,8 +649,8 @@ cca.util.ScrollTracker.prototype.probe_ = function() {
var scrollTop = this.scroller_.scrollTop; var scrollTop = this.scroller_.scrollTop;
var scrollChanged = var scrollChanged =
scrollLeft != this.lastScrollPosition_[0] || scrollLeft !== this.lastScrollPosition_[0] ||
scrollTop != this.lastScrollPosition_[1] || scrollTop !== this.lastScrollPosition_[1] ||
this.scroller_.animating; this.scroller_.animating;
if (scrollChanged) { if (scrollChanged) {
...@@ -732,7 +732,7 @@ cca.util.MouseScroller = function(scroller) { ...@@ -732,7 +732,7 @@ cca.util.MouseScroller = function(scroller) {
* @private * @private
*/ */
cca.util.MouseScroller.prototype.onMouseDown_ = function(event) { cca.util.MouseScroller.prototype.onMouseDown_ = function(event) {
if (event.which != 1) { if (event.which !== 1) {
return; return;
} }
this.startPosition_ = [event.screenX, event.screenY]; this.startPosition_ = [event.screenX, event.screenY];
...@@ -754,7 +754,7 @@ cca.util.MouseScroller.prototype.onMouseMove_ = function(event) { ...@@ -754,7 +754,7 @@ cca.util.MouseScroller.prototype.onMouseMove_ = function(event) {
// It may happen that we won't receive the mouseup event, when clicking on // It may happen that we won't receive the mouseup event, when clicking on
// the -webkit-app-region: drag area. // the -webkit-app-region: drag area.
if (event.which != 1) { if (event.which !== 1) {
this.startPosition_ = null; this.startPosition_ = null;
this.startScrollPosition_ = null; this.startScrollPosition_ = null;
return; return;
......
...@@ -135,7 +135,7 @@ cca.views.Camera = function( ...@@ -135,7 +135,7 @@ cca.views.Camera = function(
// Monitor the states to stop camera when locked/minimized. // Monitor the states to stop camera when locked/minimized.
chrome.idle.onStateChanged.addListener((newState) => { chrome.idle.onStateChanged.addListener((newState) => {
this.locked_ = (newState == 'locked'); this.locked_ = (newState === 'locked');
if (this.locked_) { if (this.locked_) {
this.restart(); this.restart();
} }
...@@ -199,7 +199,7 @@ cca.views.Camera.prototype.beginTake_ = function() { ...@@ -199,7 +199,7 @@ cca.views.Camera.prototype.beginTake_ = function() {
} }
await this.modes_.current.startCapture(); await this.modes_.current.startCapture();
} catch (e) { } catch (e) {
if (e && e.message == 'cancel') { if (e && e.message === 'cancel') {
return; return;
} }
console.error(e); console.error(e);
...@@ -272,7 +272,7 @@ cca.views.Camera.prototype.layout = function() { ...@@ -272,7 +272,7 @@ cca.views.Camera.prototype.layout = function() {
* @override * @override
*/ */
cca.views.Camera.prototype.handlingKey = function(key) { cca.views.Camera.prototype.handlingKey = function(key) {
if (key == 'Ctrl-R') { if (key === 'Ctrl-R') {
cca.toast.show(this.preview_.toString()); cca.toast.show(this.preview_.toString());
return true; return true;
} }
......
...@@ -210,7 +210,7 @@ cca.views.camera.Modes = function( ...@@ -210,7 +210,7 @@ cca.views.camera.Modes = function(
* @param {!cca.views.camera.Mode} mode Mode to be toggled. * @param {!cca.views.camera.Mode} mode Mode to be toggled.
*/ */
cca.views.camera.Modes.prototype.updateModeUI_ = function(mode) { cca.views.camera.Modes.prototype.updateModeUI_ = function(mode) {
Object.keys(this.allModes_).forEach((m) => cca.state.set(m, m == mode)); Object.keys(this.allModes_).forEach((m) => cca.state.set(m, m === mode));
const element = document.querySelector(`.mode-item>input[data-mode=${mode}]`); const element = document.querySelector(`.mode-item>input[data-mode=${mode}]`);
element.checked = true; element.checked = true;
const wrapper = element.parentElement; const wrapper = element.parentElement;
...@@ -373,7 +373,7 @@ cca.views.camera.Modes.prototype.updateModeSelectionUI = ...@@ -373,7 +373,7 @@ cca.views.camera.Modes.prototype.updateModeSelectionUI =
*/ */
cca.views.camera.Modes.prototype.updateMode = cca.views.camera.Modes.prototype.updateMode =
async function(mode, stream, deviceId, captureResolution) { async function(mode, stream, deviceId, captureResolution) {
if (this.current != null) { if (this.current !== null) {
await this.current.stopCapture(); await this.current.stopCapture();
} }
this.updateModeUI_(mode); this.updateModeUI_(mode);
...@@ -562,7 +562,7 @@ cca.views.camera.Video.prototype.start_ = async function() { ...@@ -562,7 +562,7 @@ cca.views.camera.Video.prototype.start_ = async function() {
this.startSound_ = null; this.startSound_ = null;
} }
if (this.mediaRecorder_ == null) { if (this.mediaRecorder_ === null) {
try { try {
if (!MediaRecorder.isTypeSupported( if (!MediaRecorder.isTypeSupported(
cca.views.camera.Video.VIDEO_MIMETYPE)) { cca.views.camera.Video.VIDEO_MIMETYPE)) {
...@@ -600,7 +600,7 @@ cca.views.camera.Video.prototype.stop_ = function() { ...@@ -600,7 +600,7 @@ cca.views.camera.Video.prototype.stop_ = function() {
if (this.startSound_ && this.startSound_.cancel) { if (this.startSound_ && this.startSound_.cancel) {
this.startSound_.cancel(); this.startSound_.cancel();
} }
if (this.mediaRecorder_ && this.mediaRecorder_.state == 'recording') { if (this.mediaRecorder_ && this.mediaRecorder_.state === 'recording') {
this.mediaRecorder_.stop(); this.mediaRecorder_.stop();
} }
}; };
...@@ -696,7 +696,7 @@ cca.views.camera.Photo.prototype = { ...@@ -696,7 +696,7 @@ cca.views.camera.Photo.prototype = {
*/ */
cca.views.camera.Photo.prototype.start_ = async function() { cca.views.camera.Photo.prototype.start_ = async function() {
cca.sound.play('#sound-shutter'); cca.sound.play('#sound-shutter');
if (this.imageCapture_ == null) { if (this.imageCapture_ === null) {
try { try {
this.imageCapture_ = new ImageCapture(this.stream_.getVideoTracks()[0]); this.imageCapture_ = new ImageCapture(this.stream_.getVideoTracks()[0]);
} catch (e) { } catch (e) {
...@@ -903,7 +903,7 @@ cca.views.camera.Portrait.prototype = { ...@@ -903,7 +903,7 @@ cca.views.camera.Portrait.prototype = {
*/ */
cca.views.camera.Portrait.prototype.start_ = async function() { cca.views.camera.Portrait.prototype.start_ = async function() {
cca.sound.play('#sound-shutter'); cca.sound.play('#sound-shutter');
if (this.crosImageCapture_ == null) { if (this.crosImageCapture_ === null) {
try { try {
this.crosImageCapture_ = this.crosImageCapture_ =
new cca.mojo.ImageCapture(this.stream_.getVideoTracks()[0]); new cca.mojo.ImageCapture(this.stream_.getVideoTracks()[0]);
......
...@@ -149,8 +149,8 @@ cca.views.camera.Options.prototype.switchDevice_ = async function() { ...@@ -149,8 +149,8 @@ cca.views.camera.Options.prototype.switchDevice_ = async function() {
const devices = await this.infoUpdater_.getDevicesInfo(); const devices = await this.infoUpdater_.getDevicesInfo();
cca.util.animateOnce(document.querySelector('#switch-device')); cca.util.animateOnce(document.querySelector('#switch-device'));
var index = var index =
devices.findIndex((entry) => entry.deviceId == this.videoDeviceId_); devices.findIndex((entry) => entry.deviceId === this.videoDeviceId_);
if (index == -1) { if (index === -1) {
index = 0; index = 0;
} }
if (devices.length > 0) { if (devices.length > 0) {
...@@ -203,7 +203,7 @@ cca.views.camera.Options.prototype.updateValues = async function(stream) { ...@@ -203,7 +203,7 @@ cca.views.camera.Options.prototype.updateValues = async function(stream) {
cca.views.camera.Options.prototype.updateMirroring_ = function(facingMode) { cca.views.camera.Options.prototype.updateMirroring_ = function(facingMode) {
// Update mirroring by detected facing-mode. Enable mirroring by default if // Update mirroring by detected facing-mode. Enable mirroring by default if
// facing-mode isn't available. // facing-mode isn't available.
var enabled = facingMode ? facingMode != 'environment' : true; var enabled = facingMode ? facingMode !== 'environment' : true;
// Override mirroring only if mirroring was toggled manually. // Override mirroring only if mirroring was toggled manually.
if (this.videoDeviceId_ in this.mirroringToggles_) { if (this.videoDeviceId_ in this.mirroringToggles_) {
...@@ -261,7 +261,7 @@ cca.views.camera.Options.prototype.videoDeviceIds = async function() { ...@@ -261,7 +261,7 @@ cca.views.camera.Options.prototype.videoDeviceIds = async function() {
cros.mojom.CameraFacing.CAMERA_FACING_FRONT; cros.mojom.CameraFacing.CAMERA_FACING_FRONT;
// Put the selected video device id first. // Put the selected video device id first.
var sorted = devices.map((device) => device.deviceId).sort((a, b) => { var sorted = devices.map((device) => device.deviceId).sort((a, b) => {
if (a == b) { if (a === b) {
return 0; return 0;
} }
if (this.videoDeviceId_ ? a === this.videoDeviceId_ : if (this.videoDeviceId_ ? a === this.videoDeviceId_ :
......
...@@ -355,7 +355,7 @@ cca.views.ResolutionSettings.prototype.photoOptTextTempl_ = function( ...@@ -355,7 +355,7 @@ cca.views.ResolutionSettings.prototype.photoOptTextTempl_ = function(
const /** number */ d = gcd(r.width, r.height); const /** number */ d = gcd(r.width, r.height);
if (resolutions.some( if (resolutions.some(
(findR) => !findR.equals(r) && r.aspectRatioEquals(findR) && (findR) => !findR.equals(r) && r.aspectRatioEquals(findR) &&
toMegapixel(r) == toMegapixel(findR))) { toMegapixel(r) === toMegapixel(findR))) {
return chrome.i18n.getMessage( return chrome.i18n.getMessage(
'label_detail_photo_resolution', 'label_detail_photo_resolution',
[r.width / d, r.height / d, r.width, r.height, toMegapixel(r)]); [r.width / d, r.height / d, r.width, r.height, toMegapixel(r)]);
......
...@@ -43,8 +43,10 @@ cca.views.View = function( ...@@ -43,8 +43,10 @@ cca.views.View = function(
this.dismissByEsc_ = dismissByEsc; this.dismissByEsc_ = dismissByEsc;
if (dismissByBkgndClick) { if (dismissByBkgndClick) {
this.rootElement_.addEventListener('click', (event) => this.rootElement_.addEventListener(
event.target == this.rootElement_ && this.leave({bkgnd: true})); 'click',
(event) =>
event.target === this.rootElement_ && this.leave({bkgnd: true}));
} }
}; };
...@@ -71,10 +73,10 @@ cca.views.View.prototype.handlingKey = function(key) { ...@@ -71,10 +73,10 @@ cca.views.View.prototype.handlingKey = function(key) {
cca.views.View.prototype.onKeyPressed = function(key) { cca.views.View.prototype.onKeyPressed = function(key) {
if (this.handlingKey(key)) { if (this.handlingKey(key)) {
return true; return true;
} else if (key == 'Ctrl-V') { } else if (key === 'Ctrl-V') {
cca.toast.show(chrome.runtime.getManifest().version); cca.toast.show(chrome.runtime.getManifest().version);
return true; return true;
} else if (this.dismissByEsc_ && key == 'Escape') { } else if (this.dismissByEsc_ && key === 'Escape') {
this.leave(); this.leave();
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment