Simple HTML page providing data to the user based on the provided ID. Warning! Extremely unsafe. Please use new version (dynamic-content-delivery(-api))
Go to file
2024-03-08 13:35:34 +01:00
data add: applying patches 2024-03-07 14:03:58 +00:00
index.html add: applying patches 2024-03-07 14:03:58 +00:00
LICENSE add: applying patches 2024-03-07 14:03:58 +00:00
README.md deprecation notie 2024-03-08 13:35:34 +01:00
script.js fix: can't find variable on webkit 2024-03-08 08:27:24 +01:00
style.css fix: visibility 2024-03-07 14:39:56 +00:00

UPDATE: New version of DCD! So... This is really insecure. Everyone can look at your .js file and steal all IDs. New version of DCD is available here.

Dynamic Content Delivery

A static website that returns appropriate content to the website user based on the provided ID.

ATTENTION!

This site is not secure at all! If you want to store private information, do not use this repository, because anyone can access all available IDs! This is mainly a hobby project.

Which files am I allowed to edit?

How to use

Firstly, create template for your webpage. Go to index.html and edit code only between these lines:

<!-- TEMPLATE BEGINS -->
 
<!-- TEMPLATE ENDS -->

This is the template section of the HTML file.

Example:

<!-- TEMPLATE BEGINS -->
<p id="name">Hi!</p>           
<!-- TEMPLATE ENDS -->

Then, using your template, modify your data in data-source.js. How to do this?

  1. This is base template of the DATA object:
"<id>": {
    "<selector 1>": () => { ... },
    "<selector 2>": () => { ... },
    ...
}
  1. View example here.

Example based on HTML provided above:

const DATA = {
    "example-id": {
        "#name": (element) => {
            element.textContent = "Hi, Lisa! Your ID is example-id."
        }
    }
}

Custom styles

This website supports custom CSS. Just edit this file. If provided style doesn't work, try adding !important to the end of CSS rule.