HTML without javascript

Can you share your document so I can try it for myself? Viví en formentera durante 8 años.

Claro! He hecho un un zip pero no me deja subirlo aunque dice que es zip es uno de los archivos admitidos…

https://www.dropbox.com/s/w1cfb5px539e4c7/html_hype.zip?dl=0

This worked for me… give it a try:

var head=document.querySelector('head').outerHTML; var HEAD_REGEX = /<div>|<\/div>|\&nbsp\;/gi; while (HEAD_REGEX.test(head)) { head = head.replace(HEAD_REGEX, '');}; var body=document.querySelector('body').outerHTML; var SCRIPT_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; while (SCRIPT_REGEX.test(body)) { body = body.replace(SCRIPT_REGEX, '');}; copy(head+body);

giving me this static page

Not working, same error. Can you send me the file that worked for you?

That is strange. Sure I am currently shopping grocery but after that.

Thanks. I’m on a Mac, if it helps…

I guess we all are using Hype and so on… :slight_smile:

:man_facepalming:Yes!!

Finally it worked in another computer, but if I see the code it still has javascript on it.

I am back. The script is certainly not perfectly debugged and I put it together on the spot. I guess it still needs testing in different environments. I ran it in chrome! And this is my output:

index_static.html.zip (5,3 KB)

I just realized that the URLs are full file refs and not shortend to relative paths. I’ll fix that next.

Yes, images are not displayed and the link is not working in “ver documentation técnica”.

Well the images thats the URL thing I was talking about. Thats fixable. The button in Hype also works with JS and that why it’s not working. You have to enter that link in the Hype file as a regular link instead of using the button handler of the side panel.

This is with some basic formatting and no underline

<a href="https://google.com" style="text-decoration:none;color:#00f;">My text</a>

The latest version …

var h=document.querySelector('head').outerHTML; var HRGX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>|<div>|<\/div>|\&nbsp\;/gi; while (HRGX.test(h)) { h = h.replace(HRGX, '');}; var b=document.querySelector('body').outerHTML; var SRGX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; while (SRGX.test(b)) { b = b.replace(SRGX, '');}; var FRGX = new RegExp(location.href.replace(/[^/]*$/, ''),"g"); while (FRGX.test(b)) { b = b.replace(FRGX, '');}; copy(h+b);

Produces this …
index_static.html.zip (5,3 KB)

PS: I always only attach the HTML. Sending the ressource folder every time would be annoying. But I think that was clear! :slight_smile:

2 Likes

Great!!! It worked!!

Muchas gracias amigo!!!

Your welcome! I actually turned this into an Enabler see …

Thanks again.

One more thing (I think this is off topic, sorry about that): I want to upload the html to mail chimp but it is not displayed properly. I think (but not sure) this is because there is not a css file. How can I create it?

Thanks

Not totally off-topic :wink: . We have to run the output through the WC3 validation and see what the issue might be. Also the CSS is inline so it shouldn’t be the problem. I’ll look into it later. Another thing (mailchimp specific) might be that the resources are in a nested folder.

I updated Hype CodeSnapshot Enabler … add the symbol to your stage and use it with Ctrl + Alt + Shift + S
It will prompts you some questions and I’d suggest you delete the resource path from the prompt. This way it generates a file that references all files in the same folder. Maybe that helps.