JavaScript is required. Please enable it to continue.
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
<h1><center><img id="logo" @src="setup.Path + 'favicon/WUT_38x38.png'"> Website Update Tracker</center></h1><center><<set _updateCount = 0; _siteList = clone(setup.siteNames).sort()>>Supported sites: <<for _i = 0; _i < _siteList.length; _i++>><span class="siteblock"><a @href="setup.website[_siteList[_i]].site" target="_blank"><img @src="setup.website[_siteList[_i]].icon" class="icon"> <<= setup.website[_siteList[_i]].name>></a></span><<if _i < _siteList.length - 1>>, <</if>><<if _i === _siteList.length - 2>>& <</if>><</for>> (''Note:'' This tracker requires a CORS unblocker, like the <a href="https://add0n.com/access-control.html">Access Control-Allow-Origin - Unblock</a> (<a href="https://chrome.google.com/webstore/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino/"><img id="chrome" alt="Chrome Extension" @src="setup.ImagePath + 'Chrome-20.png'" class="browserIcon"></a> & <a href="https://addons.mozilla.org/en-US/firefox/addon/cors-unblock/"><img id="chrome" alt="Firefox Add-On" @src="setup.ImagePath + 'Firefox-20.png'" class="browserIcon"></a>) browser extension, for it to work.) </center> <<textboxPlus "''URL:''" "_URL" `{ default: "", placeholder: "URLs pasted here are automatically added or updated.", spellcheck: false, autocomplete: "off" }`>> <center><span class="inet"><<button '<span class="tme-icon tme-thumbtack" style="display: inline-block;"></span> Add URL to tracker'>> <<run setup.parseItem($("#textbox--url").val())>> <</button>> <<button "<<= setup.clipboard>> Paste URL from clipboard">> <<run navigator.clipboard.readText().then(function (text) { $("#textbox--url").val(text); setup.parseItem(text); })>> <</button>> <<button '<span class="tme-icon tme-load" style="display: inline-block;"></span> Import List'>> <<run setup.loadDialog()>> <</button>> <<button '<span class="tme-icon tme-save" style="display: inline-block;"></span> Export List'>> <<if Save.slots.has(0)>> <<run setup.saveData(State.variables, "Website_Update_Tracker_backup.lsm")>> <</if>> <</button>> <<button '<span class="tme-icon tme-refresh" style="display: inline-block;"></span> Check For Updates'>> <<for _i = 0; _i < $websiteList.length; _i++>> <<run setup.refreshItem(_i)>> <</for>> <</button>></span></center> (TEMPORARY: Update the save after making any changes.) <<button '<span class="tme-icon tme-load" style="display: inline-block;"></span> Reload Save'>> <<if Save.slots.has(0)>> <<run Save.slots.load(0)>> <</if>> <</button>> <span class="inet"><<button '<span class="tme-icon tme-save" style="display: inline-block;"></span> Update Save'>> <<set _quickSave = true>> <<if Save.slots.has(0)>> <<set _title = Save.slots.get(0).title>> <<else>> <<set _title = "Website List">> <</if>> <<run Save.slots.save(0, _title)>> <<run Save.slots.load(0)>> <</button>></span> <div id="websitelist"><label>''Website List:''</label> <table id="info"> <tr> <th class="info-cell" title="Information"><span class="tme-icon tme-info-solid"></span></th> <th class="info-cell" title="Sort by Title" onclick="sortTitle()">Title</th> <th class="info-cell" title="Sort by Status" onclick="sortStatus()">Status</th> <th class="info-cell" title="Delete Item"><span class="tme-icon tme-trash-solid"></span></th> <th class="info-cell" title="Force Refresh"><span class="tme-icon tme-refresh-solid"></span></th> </tr> </table></div>\ <span id="status" class="infoItem">Internet is down</span><span id="update" class="infoItem">Updating: 0</span>\ <<script>> $(document).one(":passagerender", function (event) { $(event.content).find("#textbox--url").on("paste", function (event) { var txt = (event.originalEvent.clipboardData || window.clipboardData).getData("text"); if ((txt !== "") && (setup.enabled)) { setup.parseItem(txt); } }).on("focus", function (event) { this.select(); }); }); $(document).one(":passageend", function (event) { setup.refreshTable(event.content); }); <</script>>
<<set $websiteList = []>> <<set $itemOrder = []>> <<set $itemIndex = 0>> <<set $sortType = "table-a">>
<div id="navbtns"><span id="itemPrv" title="Previous Website"><<button "''◄─''">> <<if $websiteList.length>> <<if ndef $itemIndex>> <<set $itemIndex = 0>> <<else>> <<set $itemIndex-->> <</if>> <<if $itemIndex < 0>> <<set $itemIndex = $itemOrder.length - 1>> <</if>> <<if $itemIndex >= $itemOrder.length>> <<set $itemIndex = 0>> <</if>> <<run showItem($itemOrder[$itemIndex])>> <</if>> <</button>></span> <span id="itemPos">0 of 0</span> <span id="itemNxt" title="Next Website"><<button "''─►''">> <<if $websiteList.length>> <<if ndef $itemIndex>> <<set $itemIndex = 0>> <<else>> <<set $itemIndex++>> <</if>> <<if $itemIndex < 0>> <<set $itemIndex = $itemOrder.length - 1>> <</if>> <<if $itemIndex >= $itemOrder.length>> <<set $itemIndex = 0>> <</if>> <<run showItem($itemOrder[$itemIndex])>> <</if>> <</button>></span></div><a href="" id="itemLink" target="_blank"><img id="itemImage" src=""> ''<div id="itemTitle"></div>''</a> <div id="itemData">''Info Page: ''<a href="" id="itemInfo" target="_blank">See here</a> ''Status: ''<span id="itemStatus">No website selected</span> ''Refreshed: ''<span id="itemRefresh"></span></div>\ <<if $websiteList.length > 0>>\ <<if (ndef $itemIndex) || ($itemIndex >= $websiteList.length)>>\ <<set $itemIndex = 0>>\ <</if>>\ <<run showItem($itemOrder[$itemIndex])>>\ <</if>>
/* <<textboxPlus>> widget - Start */ /* Usage: <<textboxPlus "Label: " "$variableName" `{ default: "Default value", passage: "Passage name", placeholder: "Placeholder text", maxlength: 10, spellcheck: false, autofocus: true, autocomplete: "off", password: true, readonly: true, disabled: true }`>> NOTE: If you put a space as the last character for the label then, instead of the textbox appearing to the right of the label, the textbox will appear on the line BELOW the label. Also, all of the options in the third parameter are optional. For a list of all "autocomplete" options see: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete */ <<widget "textboxPlus">> <<if ($args[1][0] !== "$") && ($args[1][0] !== "_")>> /* Show error message for bad variable name. */ <span class="errmsg" data-msg="<<textboxPlus>> - Invalid variable name." @data-src="$args[1]"></span> <<run $(document).one(":passagerender", function (ev) { $(ev.content).find(".errmsg").each(function (idx) { throwError($(this), $(this).data("msg"), $(this).data("src")); }); } )>> <<else>> /* Create textboxPlus input box. */ <<if $args[1][0] === "$">> <<set _textboxPlusName = "textbox-" + $args[1].substr(1).toLowerCase()>> <<else>> <<set _textboxPlusName = "textbox--" + $args[1].substr(1).toLowerCase()>> <</if>> <<if ndef $args[2]>> <<set _textboxPlusOptions = {}>> <<else>> <<set _textboxPlusOptions = $args[2]>> <</if>> <<if ndef _textboxPlusOptions.placeholder>> <<set _textboxPlusOptions.placeholder = "">> <</if>> <<if ndef _textboxPlusOptions.maxlength>> <<set _textboxPlusOptions.maxlength = "">> <</if>> <<if ndef _textboxPlusOptions.spellcheck>> <<set _textboxPlusOptions.spellcheck = true>> <</if>> <<if ndef _textboxPlusOptions.autocomplete>> <<set _textboxPlusOptions.autocomplete = "">> <</if>> <<if ndef _textboxPlusOptions.password>> <<set _textboxPlusOptions.password = "">> <</if>> <<if ndef _textboxPlusOptions.readonly>> <<set _textboxPlusOptions.readonly = "">> <</if>> <<if ndef _textboxPlusOptions.disabled>> <<set _textboxPlusOptions.disabled = "">> <</if>> <span class="textboxplus" @data-placeholder="_textboxPlusOptions.placeholder" @data-maxlength="_textboxPlusOptions.maxlength" @data-spellcheck="_textboxPlusOptions.spellcheck" @data-autocomplete="_textboxPlusOptions.autocomplete" @data-password="_textboxPlusOptions.password" @data-readonly="_textboxPlusOptions.readonly" @data-disabled="_textboxPlusOptions.disabled"> <label @for="_textboxPlusName">$args[0]</label> <<if $args[0][$args[0].length - 1] === " ">> <br> <</if>> <<if ndef _textboxPlusOptions.default>> <<set _textboxPlusOptions.default = "">> <</if>> <<if ndef _textboxPlusOptions.passage>> <<if _textboxPlusOptions.autofocus>> <<textbox $args[1] _textboxPlusOptions.default autofocus>> <<else>> <<textbox $args[1] _textboxPlusOptions.default>> <</if>> <<else>> <<if _textboxPlusOptions.autofocus>> <<textbox $args[1] _textboxPlusOptions.default _textboxPlusOptions.passage autofocus>> <<else>> <<textbox $args[1] _textboxPlusOptions.default _textboxPlusOptions.passage>> <</if>> <</if>> </span> <</if>> <</widget>> <<script>> $(document).on(":passagerender", function (event) { /* Update textboxPlus input boxes. */ $(event.content).find(".textboxplus").each(function () { var options = {}, props = {}; var data = $(this).data("placeholder"); if (data) { options.placeholder = data; } data = $(this).data("maxlength"); if (data) { options.maxlength = data; } data = $(this).data("spellcheck"); if (data.toString().toLowerCase() === "false") { options.spellcheck = "false"; } data = $(this).data("autocomplete"); if (data) { options.autocomplete = data; } data = $(this).data("password"); if (data) { props.type = "password"; } data = $(this).data("readonly"); if (data) { props.readonly = data; } data = $(this).data("disabled"); if (data) { props.disabled = data; } $(this).find("input").each(function () { if (props.type) { $(this).removeProp("type").attr(options).prop(props); } else { $(this).attr(options).prop(props); } }); }); }); <</script>> /* <<textboxPlus>> widget - End */ /* <<checkboxPlus>> widget This widget allows you to display a custom checkbox which sets a SugarCube variable, displays a (clickable) label, and satisfies accessibility guidelines for users with impairments (usable via the keyboard with TAB, SHIFT+TAB, and SPACE keys). The checkboxes are also larger, to make them easier to see and to click on for mobile devices. Usage: <<checkboxPlus "variableName" "text" ["className"]>> The value of the checkbox would then be tied to a variable, which is passed to the widget as a string. All story variables passed to the widget will be set to either a Boolean true or false. If the variable had a "truthy" value, then the checkbox will be checked. The "className" is an optional parameter, which adds that CSS class to the text. Example: <<checkboxPlus "$EnabledOp" "Enable Option" "blueText">> */ <<widget "checkboxPlus">> /* Make sure the variable passed in is a boolean. */ <<set State.setVar($args[0], !!State.getVar($args[0]))>> <<if ndef _checkboxIDno>> /* Start checkbox IDs at 1. */ <<set _checkboxIDno = 1>> <<else>> /* Next checkbox ID. */ <<set _checkboxIDno++>> <</if>> <<set _checkboxData = "'" + $args[0] + "'">> <<if def $args[2]>> <<set _cbStyle = " " + $args[2]>> <<else>> <<set _cbStyle = "">> <</if>> /* Display checkbox. */ <span class="chkbox" tabindex="0" onkeypress="if ((event.key == ' ') || (event.key == 'Spacebar')) { $(this).find('input[type=\'checkbox\']').trigger('click'); return false; }"> <<print '<input type="checkbox" id="checkbox_' + _checkboxIDno + '" tabindex="-1" class="cbhidden" onchange="SugarCube.State.setVar(' + _checkboxData + ', this.checked)" data-var="' + $args[0] + '"' + (State.getVar($args[0]) ? ' checked' : '') + '>'>> <label @for="'checkbox_' + _checkboxIDno" @class="'chklabel' + _cbStyle"> $args[1] </label> </span> <</widget>> /* <<checkboxPlus>> Widget - End */