You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-11-27 00:21:07 +02:00
Automatically format YAML, CSS, and JS files (#1272)
Initially, I also formatted the templates in `theme/`, but this triggers https://github.com/prettier/prettier/issues/11834. So I exclude them for now. --------- Co-authored-by: Ming-Ying Chung <mych@chromium.org>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
[dir=rtl] #language-list {
|
||||
[dir="rtl"] #language-list {
|
||||
left: 10px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
(function() {
|
||||
(function () {
|
||||
let notes = document.querySelector("details");
|
||||
// Create an unattached DOM node for the code below.
|
||||
if (!notes) {
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// Update the window. This shows/hides controls as necessary for regular and
|
||||
// speaker note pages.
|
||||
function applyState() {
|
||||
function applyState() {
|
||||
if (window.location.hash == "#speaker-notes-open") {
|
||||
if (getState() != "popup") {
|
||||
markDefunct();
|
||||
@@ -116,9 +116,11 @@
|
||||
setState("popup");
|
||||
applyState();
|
||||
} else {
|
||||
window.alert("Could not open popup, please check your popup blocker settings.");
|
||||
window.alert(
|
||||
"Could not open popup, please check your popup blocker settings."
|
||||
);
|
||||
}
|
||||
})
|
||||
});
|
||||
let popOutIcon = document.createElement("i");
|
||||
popOutIcon.classList.add("fa", "fa-external-link");
|
||||
popOut.append(popOutIcon);
|
||||
@@ -179,9 +181,11 @@
|
||||
}
|
||||
|
||||
// Update prev/next buttons to keep speaker note state.
|
||||
document.querySelectorAll('a[rel="prev"], a[rel="next"]').forEach((elem) => {
|
||||
elem.href += "#speaker-notes-open";
|
||||
});
|
||||
document
|
||||
.querySelectorAll('a[rel="prev"], a[rel="next"]')
|
||||
.forEach((elem) => {
|
||||
elem.href += "#speaker-notes-open";
|
||||
});
|
||||
}
|
||||
|
||||
let timeout = null;
|
||||
|
||||
Reference in New Issue
Block a user