Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
macaronideath
fc-pregmod
Commits
613554f9
Commit
613554f9
authored
6 years ago
by
vas
Browse files
Options
Downloads
Patches
Plain Diff
html5passage
parent
6ddde3cc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/js/rulesAssistantOptions.tw
+2
-8
2 additions, 8 deletions
src/js/rulesAssistantOptions.tw
src/js/utilJS.tw
+12
-1
12 additions, 1 deletion
src/js/utilJS.tw
src/uncategorized/rulesAssistant.tw
+1
-1
1 addition, 1 deletion
src/uncategorized/rulesAssistant.tw
with
15 additions
and
10 deletions
src/js/rulesAssistantOptions.tw
+
2
−
8
View file @
613554f9
...
@@ -11,20 +11,14 @@ window.rulesAssistantOptions = (function() {
...
@@ -11,20 +11,14 @@ window.rulesAssistantOptions = (function() {
let V
let V
let r = ""
let r = ""
function rulesAssistantOptions() {
function rulesAssistantOptions(
element
) {
V = State.variables
V = State.variables
V.nextButton = "Back to Main"
V.nextButton = "Back to Main"
V.nextLink = "Main"
V.nextLink = "Main"
V.returnTo = "Main"
V.returnTo = "Main"
V.showEncyclopedia = 1
V.showEncyclopedia = 1
V.encyclopedia = "Personal Assistant"
V.encyclopedia = "Personal Assistant"
const root = new Root(element)
let tmp = document.createElement("div")
tmp.classList.add("passage")
tmp.classList.add("rules-assistant-options")
document.getElementById("passages").appendChild(tmp)
const root = new Root(tmp)
}
}
function onreturn(e, cb) {
function onreturn(e, cb) {
...
...
This diff is collapsed.
Click to expand it.
src/js/utilJS.tw
+
12
−
1
View file @
613554f9
...
@@ -518,8 +518,19 @@ window.generateNewID = function generateNewID() {
...
@@ -518,8 +518,19 @@ window.generateNewID = function generateNewID() {
return randint + timestamp.toString(36);
return randint + timestamp.toString(36);
};
};
window.arraySwap(array, a, b) {
window.arraySwap
= function arraySwap
(array, a, b) {
const tmp = array[a];
const tmp = array[a];
array[b] = array[a];
array[b] = array[a];
array[a] = tmp;
array[a] = tmp;
};
};
// circumvents sugarcube, allowing a plain HTML5 UI within it
window.html5passage = function html5passage(passage_function) {
$(document).one(':passagedisplay', ev => {
const element = document.createElement("div");
element.classList.add("passage");
document.getElementById("passages").appendChild(element);
passage_function(element);
$(document).off(':passagedisplay');
});
};
This diff is collapsed.
Click to expand it.
src/uncategorized/rulesAssistant.tw
+
1
−
1
View file @
613554f9
:: Rules Assistant [nobr]
:: Rules Assistant [nobr]
<<script>>
$(document).one(':passagedisplay', ev => { rulesAssistantOptions(); $(document).off(':passagedisplay') }
)<</script>>
<<script>>
html5passage(rulesAssistantOptions
)<</script>>
/*
/*
<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Main">>
<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Main">>
<<set $showEncyclopedia = 1, $encyclopedia = "Personal Assistant">>
<<set $showEncyclopedia = 1, $encyclopedia = "Personal Assistant">>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment