mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
support #test in card-info.html
allows us to use scripts/ts-run and ts-watch to test the page in Chrome by surfing to http://127.0.0.1:40000/_anki/pages/card-info.html#testXXX
This commit is contained in:
parent
3672b0fe73
commit
53ce7d2759
1 changed files with 8 additions and 0 deletions
|
@ -10,5 +10,13 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="main"></div>
|
<div id="main"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// use #testXXXX where XXXX is card ID to test
|
||||||
|
if (window.location.hash.startsWith("#test")) {
|
||||||
|
const cid = parseInt(window.location.hash.substr("#test".length), 10);
|
||||||
|
anki.cardInfo(document.getElementById("main"), cid, true);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue