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
STYLES: | |
#link-dock { | |
/* base styles */ | |
position: fixed; | |
left: 0; right: 0; bottom: 0; | |
width: 100%; | |
height: 6em; | |
overflow: hide; | |
border-top: 2px solid #555; |
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
function descrList (loc, action) { // construct the list elements to keep the macro call clean-ish | |
if (!loc || !(loc instanceof setup.simpleInv.inventory)) { | |
loc = false; // if no loc, then no transferring | |
} | |
// set up vars | |
var list = this.toArray(); | |
var inv = this; | |
var $wrapper = $(document.createElement('span')); | |
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
function match (id, target, contents, macroName) { | |
return $(document.createElement('span')) | |
.attr({'id' : id, 'data-term' : target }) | |
.addClass('macro-' + macroName) | |
.wiki(contents); | |
} | |
function change (id, replacement) { | |
var $el = $(id), | |
text = $el.text(), |
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
/*! howler.js v2.0.5 | (c) 2013-2017, James Simpson of GoldFire Studios | MIT License | howlerjs.com */ | |
// modified for Harlowe by Chapel | |
!function(){"use strict";var e=function(){this.init()};e.prototype={init:function(){var e=this||n;return e._counter=1e3,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.mobileAutoEnable=!0,e._setup(),e},volume:function(e){var o=this||n;if(e=parseFloat(e),o.ctx||_(),void 0!==e&&e>=0&&e<=1){if(o._volume=e,o._muted)return o;o.usingWebAudio&&(o.masterGain.gain.value=e);for(var t=0;t<o._howls.length;t++)if(!o._howls[t]._webAudio)for(var r=o._howls[t]._getSoundIds(),a=0;a<r.length;a++){var u=o._howls[t]._soundById(r[a]);u&&u._node&&(u._node.volume=u._volume*e)}return o}return o._volume},mute:function(e){var o=this||n;o.ctx||_(),o._muted=e,o.usingWebAudio&&(o.masterGain.gain.value=e?0:o._vol |
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
(function () { | |
var options = { | |
setting : true, | |
settingName : 'Transparency: ', | |
defTrans : 30, | |
skipTags : ['mainmenu'] | |
}; | |
function toPerc (val) { |
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
window.Chapel = window.Chapel || {}; | |
(function () { | |
var storage = window.localStorage || false; | |
var achievementKey = 'tw-achievement'; | |
var achievements = []; | |
function setItem (key, val) { | |
try { | |
if (storage) { | |
storage.setItem(key, JSON.stringify(val)); |
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
\<<widget 'tenth'>> | |
\ <span id="typewriter"></span> | |
\ <<set _textArrayLength to 0, _i to 0, _output to ''>> | |
\ <<repeat .1s>> | |
\ <<if _textArrayLength gte $args[_i].length>> | |
\ <<set _i++, _textArrayLength to 0>> | |
\ <<if _i gte $args.length>> | |
\ <<stop>> | |
\ <</if>> | |
\ <<set _output to _output + '<br />'>> |
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
CSS: | |
#link-dock { | |
/* base styles */ | |
position: fixed; | |
left: 0; right: 0; top: 0; | |
width: 100%; | |
height: 6em; | |
overflow: hide; | |
border-bottom: 2px solid #555; |
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
(function () { | |
// transfer Harlowe data between stories via local storage | |
var _state = State; // scope hack the state | |
var storageKey = '%%twine-game-episode-transfer'; // change this to something with your story's title in it | |
var hasStorage = (function () { | |
return !!window.localStorage; | |
}()); |
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
/* | |
the following `(function () {...}());` statement creates a local scope for our JavaScript code. | |
this is called an IIFE, or "immediately invoked function expression". most langauges have block scoping, | |
JS has function scoping. think of this as a way to get block scoping to prevent any of our stuff from | |
polluting the global scope. | |
*/ | |
(function () { | |
/* |
OlderNewer