Alan Lansdowne's repositories
protecting-your-email-address-via-svg-instead-of-js
Conventionally, email addresses published on webpages may be protected from email-harvesting spambots via various HTML, CSS & JS-based techniques. This alternative technique is SVG-based.
Obfuscate-Deobfuscate
A simple obfuscation which works both server-side in PHP and client-side in Javascript
password-font
A custom font to deploy when required to visually obfuscate user-entered text
About-DaNIS3H-Capsules
DaNIS³H translates all core front-end browser technologies (HTML5, CSS3, Javascript and SVG) and PHP into a single JSON text file which can be deployed across web pages and web-apps as a framework-free Rich Component.
building-a-resizable-draggable-element
How to build an element in HTML, CSS and JS which is both resizable and draggable.
comments-for-json
An approach which enables character-prefixed comments to be included in JSON data - and then removed again before the JSON data is parsed or processed
comparing-modals
Using a custom modal vs. introducing a modal via the native HTML <dialog> element
createCapsuleReference
The JavaScript function createCapsuleReference() will create a Danis³h Capsule Reference in the DOM
danis3h-object-notation
danis³h Object Notation (or dON) is an alternative to JSON, optimised for use in HTML attribute values
danis3h-shortform-notation-of-xml-and-html
In addition to the standard Danis³h Notation of HTML and XML, Danis³h has a more concise shortform notation.
declare-event-listening-elements
An extension to native JavaScript which enables any element in a marked-up document to declare which event listeners are currently attached to it
eval-vs-function-constructor-vs-native-function-speed-test
Comparing the speed of eval() vs Function() constructors vs native functions
filesystem-navigator-ui
An interactive Filesystem Navigator UI for web pages
frontend-danis3h-capsules
Danis3h Capsules can be deployed anywhere. Here's how they are deployed on the Front End.
getDocumentType
A front-end function in JavaScript (and a server-side counterpart function in PHP) which confirms the Document Type as HTML or SVG
getFolders
A PHP function which scans a web directory recursively and returns a nested array representing a schema of web directory files and folders
handling-optional-event-objects
...because it's helpful to be able to re-use the same function both inside and outside of EventListeners
importFunction
A simple helper function which utilises dynamic import() to enable conventional JS files to import, asynchronously, ESModules containing single-functions, on demand / whenever needed.
inspectCapsule
A PHP function for inspecting entire Danis³h Capsules and individual Danis³h Capsule Cells, whether Active or Inactive on the current page
markupWebspace
Takes a JSON model of a web directory and converts it first into a JS Object or PHP Array and then into HTML Markup.
Pretty-Print-XML-via-PHP-and-JavaScript
When writing PHP and JavaScript, there are many contexts in which it may be desirable to pretty-print data output. JSON pretty-print methods are well-known. Here are two methods for pretty-printing XML output.
querying-uk-and-eu-vat-eori-and-company-registration-apis
The documentation for the Companies House API is limited at best. It can take literally hours to figure out how to write the JavaScript to query the API correctly. This repo contains a series of working JavaScript snippets to save others time and frustration in future.
reveal-hidden-scripts
Reveal Hidden Scripts is a technique in which scripts are wrapped in comments and later unwrapped, parsed and executed. At this stage it's still a solution looking for a problem.
setSVGDimensions
Intelligently applies width and height attributes to dynamically-resizable SVGs. Useful, not least, when drawing dynamically resizable SVGs to HTML5 Canvas.
setTabIndexes
A different approach to keyboard accessibility for web-apps, involving the setting and resetting of tab indexes
WebspaceSchema
A JSON-like data format used to describe entire webspaces: folders, files, filedata