Skip to content

Commit

Permalink
===
Browse files Browse the repository at this point in the history
  • Loading branch information
ris58h committed Oct 24, 2023
1 parent 5aa52d0 commit e655c8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension/background/background.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as youtubei from './youtubei.js'

chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (request.type == 'fetchTimeComments') {
if (request.type === 'fetchTimeComments') {
fetchTimeComments(request.videoId)
.then(sendResponse)
.catch(e => {
Expand Down
4 changes: 2 additions & 2 deletions extension/content/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function main() {
}

function getVideoId() {
if (window.location.pathname == '/watch') {
if (window.location.pathname === '/watch') {
return parseParams(window.location.href)['v']
} else if (window.location.pathname.startsWith('/embed/')) {
return window.location.pathname.substring('/embed/'.length)
Expand Down Expand Up @@ -262,7 +262,7 @@ function withWheelThrottle(callback) {
function onLocationHrefChange(callback) {
let currentHref = document.location.href
const observer = new MutationObserver(() => {
if (currentHref != document.location.href) {
if (currentHref !== document.location.href) {
currentHref = document.location.href
callback()
}
Expand Down

0 comments on commit e655c8b

Please sign in to comment.