This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[¯\_(ツ)_/¯]] | |
[[😂]] | |
[[中华人民共和国]] | |
[[¯\_(ツ)_/¯]]: | |
OK. | |
[[😂]]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@set score=0 | |
Choose an answer: | |
[The right answer](right) | |
[The wrong anser](wrong) | |
[right]: | |
@inc score | |
squiffy.story.go ("next") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on("click", "#enter-name", function () { | |
alert('ok...'); | |
}); | |
<button id="enter-name">Enter name</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@set a=2 | |
Try two variables the [same](next, b=2) or [different](next, b=3). | |
[next]: | |
set("same", get("a") == get("b")); | |
a = {a}, b = {b}, same = {same}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Increase by [one], increase by [ten], see the [[result]]. | |
[one]: | |
@inc value | |
Value is {value}. | |
[ten]: | |
set ("value", get("value") + 10); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a genuine [link], and this is a <a href="#" class="squiffy-link" onclick="return false" title="This is a tooltip">fake link</a>. | |
[link]: | |
You clicked the genuine link. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randomnumber = function rng(min, max) { | |
return Math.floor(Math.random() * (max - min) + min); | |
} | |
set ("mynumber", randomnumber(1,6)); | |
Generated {mynumber}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Squiffy is a tool for creating interactive stories. This is sample is stored in a GitHub Gist. | |
You write your story in a text file. Each choice is represented by a [[new section]]. You can create links to new sections by surrounding them in double square brackets. | |
[[new section]]: | |
In addition to sections, Squiffy has the concept of passages. These are sections of text that don't advance the story. For example, you can click this [passage link], and this [other passage link], but the story won't advance until you click this [[section link]]. | |
[passage link]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: QuestKit demo via GitHub Gist | |
--- | |
location: room | |
description: This is a simple example of a room in QuestKit, and it was delivered via a Gist. | |
south: another room | |
--- | |
object: book | |
look: This is an object. You can pick me up and drop me somewhere else. |
NewerOlder