// Copy me!
var bi= window.prompt("Enter site ID (try 0?)"); // ID of website to fetch
window.web3.eth.getCode(
"0x4CecEC099a5c8B554e6Ec0cdb7B7623f5016e20b", // Fetch the code that fetches webpages
(e,r) => {
// Hex string to list of ints
for(t=r.toString(),n="",o=0;o<t.length;o+=2)
n+=String.fromCharCode(parseInt(t.substr(o,2),16));
// Run code to fetch website
eval(n.slice(1));
}
);
Assuming you have metamask, open a JavaScript console in Firefox or Chrome (Control + Shift + I) and paste the magic javascript above. Behold, as websites load from the blockchain!
EthSites is a registry of websites stored on the Ethereum blockchain. The magic javascript above connects you to the Ethereum blockchain with the Metamask Firefox or Chrome extension and retrieves websites stored in our registry. If you change the index variable bi
in the JavaScript above, you can view different websites in the registry. We've specifically made this JavaScript as short as we can. Dissidents can memorize it, people can tweet it, or wear it on a shirt!
numEntries()
method on the smart contract, and all values up to the returned value are valid.
Cause it's cool, DUH! But also...
The Ethereum blockchain has some properties that make it interesting to use as for censorship resistance:
Tyler Kell (@relyt29), Drake Eidukas (@drakeeidukas), Amy Masters, and Phil Daian (@phildaian).
Made with love at the IC3 Ethereum Bootcamp 2019.
We provide a python script to upload your own website to EthSites. See the GitHub repo for more details.