mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-05 15:32:53 +00:00
doc: asciicast - reverse list for loop to not be affected by dom change
This commit is contained in:
parent
2941a73fda
commit
2012680676
@ -1,11 +1,10 @@
|
||||
window.addEventListener("load", function () {
|
||||
// <img src="./carapace-bin.cast" alt="" />
|
||||
for (elem of document.getElementsByTagName("img")) {
|
||||
if (elem.src.endsWith(".cast")) {
|
||||
const newItem = document.createElement("div");
|
||||
newItem.id = elem.src;
|
||||
elem.parentNode.replaceChild(newItem, elem);
|
||||
AsciinemaPlayer.create(newItem.id, newItem, {cols: 108, rows: 24});
|
||||
}
|
||||
}
|
||||
for (elem of Array.prototype.slice.call(document.getElementsByTagName("img")).reverse())
|
||||
if (elem.src.endsWith(".cast")) {
|
||||
const newItem = document.createElement("div");
|
||||
newItem.id = elem.src;
|
||||
elem.parentNode.replaceChild(newItem, elem);
|
||||
AsciinemaPlayer.create(newItem.id, newItem, {cols: 108, rows: 24});
|
||||
}
|
||||
})
|
||||
|
@ -22,7 +22,6 @@ completion:
|
||||
positionalany: ["$_fs.ZipFileContents(${C_ARG0})"] # ${C_ARG1},${C_ARG2},...
|
||||
```
|
||||
|
||||
![]()
|
||||

|
||||
|
||||
## refs.yaml
|
||||
@ -39,7 +38,6 @@ completion:
|
||||
- ["$_tools.git.Refs"] # default
|
||||
```
|
||||
|
||||
![]()
|
||||

|
||||
|
||||
## embed.yaml
|
||||
@ -52,5 +50,4 @@ commands:
|
||||
positionalany: ["$chdir(~/.password-store)", "$_bridge.CarapaceBin(git)"]
|
||||
```
|
||||
|
||||
![]()
|
||||

|
||||
|
@ -33,7 +33,6 @@ carapace --style 'carapace.Value=bold,magenta'
|
||||
carapace --style 'carapace.Description='
|
||||
```
|
||||
|
||||
![]()
|
||||

|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user