Skip to content

Commit d4ff9ef

Browse files
committed
Bug 1864896: Autofix unused function arguments (browser/components/pocket). r=thecount
Differential Revision: https://phabricator.services.mozilla.com/D202951
1 parent 27cc52d commit d4ff9ef

File tree

13 files changed

+28
-38
lines changed

13 files changed

+28
-38
lines changed

browser/components/pocket/content/SaveToPocket.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export var SaveToPocket = {
101101
);
102102
},
103103

104-
observe(subject, topic, data) {
104+
observe(subject, topic) {
105105
if (topic == "browser-delayed-startup-finished") {
106106
// We only get here if pocket is disabled; the observer is removed when
107107
// we're enabled.

browser/components/pocket/content/panels/js/components/Home/Home.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function Home(props) {
3232
: ``
3333
}`;
3434

35-
const loadingRecentSaves = useCallback(resp => {
35+
const loadingRecentSaves = useCallback(() => {
3636
setArticlesState(prevState => ({
3737
...prevState,
3838
status: "loading",

browser/components/pocket/content/panels/js/components/Saved/Saved.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function Saved(props) {
8585

8686
panelMessaging.addMessageListener(
8787
"PKT_getArticleInfoAttempted",
88-
function (resp) {
88+
function () {
8989
setArticleInfoAttempted(true);
9090
}
9191
);

browser/components/pocket/content/panels/js/home/overlay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from "react";
77
import ReactDOM from "react-dom";
88
import Home from "../components/Home/Home.jsx";
99

10-
var HomeOverlay = function (options) {
10+
var HomeOverlay = function () {
1111
this.inited = false;
1212
this.active = false;
1313
};

browser/components/pocket/content/panels/js/main.bundle.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function Home(props) {
275275
status: ""
276276
});
277277
const utmParams = `utm_source=${utmSource}${utmCampaign && utmContent ? `&utm_campaign=${utmCampaign}&utm_content=${utmContent}` : ``}`;
278-
const loadingRecentSaves = (0,react.useCallback)(resp => {
278+
const loadingRecentSaves = (0,react.useCallback)(() => {
279279
setArticlesState(prevState => ({
280280
...prevState,
281281
status: "loading"
@@ -381,7 +381,7 @@ It does not contain any logic for saving or communication with the extension or
381381

382382

383383

384-
var HomeOverlay = function (options) {
384+
var HomeOverlay = function () {
385385
this.inited = false;
386386
this.active = false;
387387
};
@@ -487,7 +487,7 @@ It does not contain any logic for saving or communication with the extension or
487487

488488

489489

490-
var SignupOverlay = function (options) {
490+
var SignupOverlay = function () {
491491
this.inited = false;
492492
this.active = false;
493493
this.create = function ({
@@ -772,7 +772,7 @@ function Saved(props) {
772772
messages.addMessageListener("PKT_articleInfoFetched", function (resp) {
773773
setSavedStoryState(resp?.data?.item_preview);
774774
});
775-
messages.addMessageListener("PKT_getArticleInfoAttempted", function (resp) {
775+
messages.addMessageListener("PKT_getArticleInfoAttempted", function () {
776776
setArticleInfoAttempted(true);
777777
});
778778

@@ -843,7 +843,7 @@ It does not contain any logic for saving or communication with the extension or
843843

844844

845845

846-
var SavedOverlay = function (options) {
846+
var SavedOverlay = function () {
847847
this.inited = false;
848848
this.active = false;
849849
};
@@ -883,7 +883,7 @@ SavedOverlay.prototype = {
883883

884884

885885

886-
var StyleGuideOverlay = function (options) {};
886+
var StyleGuideOverlay = function () {};
887887
StyleGuideOverlay.prototype = {
888888
create() {
889889
// TODO: Wrap popular topics component in JSX to work without needing an explicit container hierarchy for styling
@@ -1072,7 +1072,7 @@ PKT_PANEL.prototype = {
10721072
const config = { attributes: false, childList: true, subtree: true };
10731073

10741074
// Callback function to execute when mutations are observed
1075-
const callback = (mutationList, observer) => {
1075+
const callback = mutationList => {
10761076
mutationList.forEach(mutation => {
10771077
switch (mutation.type) {
10781078
case "childList": {

browser/components/pocket/content/panels/js/main.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ PKT_PANEL.prototype = {
8686
const config = { attributes: false, childList: true, subtree: true };
8787

8888
// Callback function to execute when mutations are observed
89-
const callback = (mutationList, observer) => {
89+
const callback = mutationList => {
9090
mutationList.forEach(mutation => {
9191
switch (mutation.type) {
9292
case "childList": {

browser/components/pocket/content/panels/js/saved/overlay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from "react";
77
import ReactDOM from "react-dom";
88
import Saved from "../components/Saved/Saved.jsx";
99

10-
var SavedOverlay = function (options) {
10+
var SavedOverlay = function () {
1111
this.inited = false;
1212
this.active = false;
1313
};

browser/components/pocket/content/panels/js/signup/overlay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ReactDOM from "react-dom";
88
import pktPanelMessaging from "../messages.mjs";
99
import Signup from "../components/Signup/Signup.jsx";
1010

11-
var SignupOverlay = function (options) {
11+
var SignupOverlay = function () {
1212
this.inited = false;
1313
this.active = false;
1414

browser/components/pocket/content/panels/js/style-guide/overlay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Button from "../components/Button/Button.jsx";
66
import PopularTopics from "../components/PopularTopics/PopularTopics.jsx";
77
import TagPicker from "../components/TagPicker/TagPicker.jsx";
88

9-
var StyleGuideOverlay = function (options) {};
9+
var StyleGuideOverlay = function () {};
1010

1111
StyleGuideOverlay.prototype = {
1212
create() {

browser/components/pocket/content/pktApi.sys.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export var pktApi = (function () {
317317
request.open("GET", url, true);
318318
}
319319

320-
request.onreadystatechange = function (e) {
320+
request.onreadystatechange = function () {
321321
if (request.readyState == 4) {
322322
// "done" is a completed XHR regardless of success/error:
323323
if (options.done) {
@@ -487,7 +487,7 @@ export var pktApi = (function () {
487487
access_token: getAccessToken(),
488488
url,
489489
},
490-
success(data) {
490+
success() {
491491
if (options.success) {
492492
options.success.apply(options, Array.apply(null, arguments));
493493
}
@@ -508,7 +508,7 @@ export var pktApi = (function () {
508508
data: {
509509
access_token: getAccessToken(),
510510
},
511-
success(data) {
511+
success() {
512512
if (options.success) {
513513
options.success.apply(options, Array.apply(null, arguments));
514514
}

0 commit comments

Comments
 (0)