mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 23:37:31 +09:00
[Pale-Moon] Issue MoonchildProductions/UXP#516 - Remove named function syntax from palemoon/components/newtab.
This commit is contained in:
parent
f5a1756738
commit
3d1be0ea0f
12 changed files with 82 additions and 82 deletions
|
|
@ -15,7 +15,7 @@ var gPage = {
|
|||
/**
|
||||
* Initializes the page.
|
||||
*/
|
||||
init: function Page_init() {
|
||||
init: function () {
|
||||
// Add ourselves to the list of pages to receive notifications.
|
||||
gAllPages.register(this);
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ var gPage = {
|
|||
/**
|
||||
* Listens for notifications specific to this page.
|
||||
*/
|
||||
observe: function Page_observe(aSubject, aTopic, aData) {
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
if (aTopic == "nsPref:changed") {
|
||||
let enabled = gAllPages.enabled;
|
||||
this._updateAttributes(enabled);
|
||||
|
|
@ -102,7 +102,7 @@ var gPage = {
|
|||
* Internally initializes the page. This runs only when/if the feature
|
||||
* is/gets enabled.
|
||||
*/
|
||||
_init: function Page_init() {
|
||||
_init: function () {
|
||||
if (this._initialized)
|
||||
return;
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ var gPage = {
|
|||
* Updates the 'page-disabled' attributes of the respective DOM nodes.
|
||||
* @param aValue Whether the New Tab Page is enabled or not.
|
||||
*/
|
||||
_updateAttributes: function Page_updateAttributes(aValue) {
|
||||
_updateAttributes: function (aValue) {
|
||||
// Set the nodes' states.
|
||||
let nodeSelector = "#newtab-grid, #searchContainer";
|
||||
for (let node of document.querySelectorAll(nodeSelector)) {
|
||||
|
|
@ -159,14 +159,14 @@ var gPage = {
|
|||
/**
|
||||
* Handles unload event
|
||||
*/
|
||||
_handleUnloadEvent: function Page_handleUnloadEvent() {
|
||||
_handleUnloadEvent: function () {
|
||||
gAllPages.unregister(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles all page events.
|
||||
*/
|
||||
handleEvent: function Page_handleEvent(aEvent) {
|
||||
handleEvent: function (aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "load":
|
||||
this.onPageVisibleAndLoaded();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue