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
// Source code for the bookmarklet. | |
// This code appends a few buttons to a page to save and load form values from local storage for persistence | |
function serializeInputs() {return Array.from(document.querySelectorAll("input, textarea")).map(({id, tagName, name, value}) => ({id, tagName, name, value}))} | |
function restoreInputs(serialized) {serialized.forEach(({id, tagName, name, value}) => {var $el = document.querySelector(id ? `#${id}` : `${tagname}[name="${name}"`); $el.value ??= value})} | |
function save() { | |
localStorage.setItem("formFields", JSON.stringify(serializeInputs())) | |
} | |
function load() { |
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
--# Main | |
--Codea Community Single Install | |
--Installer created by @Briarfox | |
--- This will pull the Codea Community project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named Codea Community If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "Codea Community" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) |
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
--# Main | |
--Codea Community Single Install | |
--Installer created by @Briarfox | |
--- This will pull the Codea Community project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named Codea Community If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "Codea Community" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) |
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
Codea Community Tab Order Version: 1.1.1.4 | |
------------------------------ | |
This file should not be included in the Codea project. | |
#Main | |
#ChangeLog | |
#Bootstrap | |
#ccVars | |
#Community | |
#Pending | |
#Delete |
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
--# Main | |
--Voronoi Maps Single Install | |
--Installer created by @Briarfox | |
--- This will pull the Voronoi Maps project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named Voronoi Maps If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "Voronoi Maps" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) |
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
--# Main | |
--Pixel Art Single Install | |
--Installer created by @Briarfox | |
--- This will pull the Pixel Art project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named Pixel Art If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "Pixel Art" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) |
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
--# Main | |
--Pixel Art Single Install | |
--Installer created by @Briarfox | |
--- This will pull the Pixel Art project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named Pixel Art If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "Pixel Art" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) |
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
--# Main | |
--FallingSand Single Install | |
--Installer created by @Briarfox | |
--- This will pull the FallingSand project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named FallingSand If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "FallingSand" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) |
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
--# Button | |
Button = class() | |
-- Fast Mesh Button Class courtesy of @Vega | |
function Button:init(text,x,y,width,height) | |
self.state = "normal" | |
self.text = text | |
self.textColor = color(255,255,255,192) |