-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from faraplay/prefs
Format preferences page
- Loading branch information
Showing
8 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "wp-build", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [], | ||
"label": "npm: wp-build", | ||
"detail": "webpack" | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "install", | ||
"group": "none", | ||
"problemMatcher": [], | ||
"label": "npm: install", | ||
"detail": "install dependencies from package" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export function formatPrefTable() { | ||
const table = document.querySelector("table.preftable"); | ||
if (!table) { | ||
return; | ||
} | ||
const tableParent = table.parentNode; | ||
const prefDiv = document.createElement("div"); | ||
tableParent.appendChild(prefDiv); | ||
tableParent.removeChild(table); | ||
const tbody = table.firstChild; | ||
for (const row of tbody.childNodes) { | ||
const newRow = document.createElement("div"); | ||
newRow.setAttribute("class", "pref-row"); | ||
prefDiv.appendChild(newRow); | ||
|
||
const header = document.createElement("h1"); | ||
header.innerText = row.firstChild.innerText; | ||
newRow.appendChild(header); | ||
|
||
const prefright = row.lastChild; | ||
newRow.appendChild(prefright); | ||
} | ||
} | ||
|
||
formatPrefTable(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,4 @@ | |
"webpack-cli": "^5.1.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |