We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6f35fd commit 61a0bcdCopy full SHA for 61a0bcd
js/requirements.js
@@ -1,5 +1,6 @@
1
/**
2
* These are the requirements to successfully leave a page
3
+ * and the links on the top, marked or unmarked.
4
*/
5
6
var requirements = [];
@@ -9,11 +10,18 @@ function required(callable) {
9
10
}
11
12
function getId() {
- return "requirements.js-" + current_page_id;
13
+ return getCookieId(current_page_id);
14
15
16
function getLinkId(link) {
- return "requirements.js-" + link.id
17
+ return getCookieId(link.id);
18
+}
19
+
20
+function getCookieId(page_id) {
21
+ /* The id of pages for the cookies */
22
+ var numbering_regex = /\d+-\d+/;
23
+ var numbering = numbering_regex.exec(page_id);
24
+ return "requirements.js-step-" + numbering[0];
25
26
27
function updateRequirements() {
0 commit comments