go to about:config
full-screen-api.allow-trusted-requests-only:
true -> false
Internet explorer problems
# If nothing seems to work properly, check that doctype is in the top of the page:
<!DOCTYPE html>
-> Otherwise the code is meant to be run on old IE versions
# HttpRequests doesnt change; data returned by the server doesn't change after the first time it was received
# Use cache buster in HTTP requests:
Example:
var CB = Math.random()*10000000000000000;
var snd = "programControl=stop&CB=" + CB;
-> Random data is added to the end of the HttpRequest because IE caches HttpRequest responses.
-> Doing this trick we can make sure that IE won't fetch the cached data because the HttpRequest has changed
NodeJS notes
# Setting up NodeJS# Create a directory for NodeJS appcreatefoldernamedforexample'html_events'# Move to that directorycdhtml_events
# Initialize npmnpminit
# For reference:"name":"html_events",
"version":"1.0.0",
"description":"html events",
"main":"app.js",
"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},
"keywords":["html",
"events"],
"author":"toni",
"license":"ISC"# Install node modulesnpminstallexpress--save
# Create app.js file to the same folder where package.json is:constexpress=require("express");letapp=express();app.use(express.static(__dirname+"/public_www"));app.listen(8080);console.log("Running in port 8080");# Start NodeJS server:nodeapp
# Create web pages:createpublic_www-folder
index.html
style.css
script.js
# Check browserlocalhost:8080
React notes
# Get and install React1.Visithttps://nodejs.org/en/
2.DownloadthelatestLTSnodejs+npmpacket
3.Install
# Take React into use by creating a simple app1.Opennodejscommandprompt
2.npxcreate-react-appmy-app
3.cdmy-app
4.npmstart
# Deployment example:https://www.reddit.com/r/reactjs/comments/d81gjb/how_to_deploy_your_app_setup_a_free_ssl/
# Cheat sheet:https://github.com/LeCoupa/awesome-cheatsheets/blob/master/frontend/react.js
# Clean barebones project example for learning purposes:https://www.reddit.com/r/reactjs/comments/arox51/i_made_a_barebones_fullstack_reddit_clone_to/
# Icons:https://iconscout.com/unicons
https://github.com/Iconscout/react-unicons
https://github.com/react-icons/react-icons
# Good React practices.https://www.reddit.com/r/reactjs/comments/cgxg7o/a_beginners_guide_to_writing_good_react_code/
https://arvind.io/posts/writing-good-react-code/
Gatsby notes
# Add video as inline HTMLAddvideoto/static/folder
<dl>
<videowidth="640"height="480"controls>
<sourcesrc="../bandicam.mp4"type="video/mp4">
</video>
</dl>
# Bold formatting Tobeabletouse'_'in**bolded**text,itneedstobeescapedwith'\'-characterinfrontofit
Forexample:io_scene_godotneedstobewrittenlike**io\_scene\_godot**
Wordpress notes
## Add borders to images ( adds borders to all images on the website )# 1. Go to customize pageDashboard->Appearance->Customize
# 2. Go to CSS settings'Additional CSS'# 3. Add custom CSS to the edit box.post.entry-contentimg{border:1pxsolid#000000;}# 4. Click publish## Install SiteLock-trust shield# Get the shield# 1. Go to SiteLock dashboardhttps://secure.sitelock.com/dashboard
# 2. On the top of the page:ClickDeploy'SiteLock Trust Seal'button
# 3. Fill out the settings# 4. Copy the html code on the last settings page.## Install the SiteLock logo to the website footer# 1. Edit the pageDashboard->Appearance->Customize
# 2. Make sure you have footer bar.Layout->Footer
# 3. Add the logo to footerWidgets->Footerbar->Addawidget->pastethehtmlhere.
# 4. Publish.## Collapse content ( collapse text with a button click )# 1. Install collapse pugin.Show-Hide/Collapse-Expand
# 2. Add to a new post and wrap bg_collapse and /bg_collapse around brackets []:bg_collapseview="link"color="#4286f4"icon="arrow"expand_text="Show More"collapse_text="Show Less"your_content_here
/bg_collapse
## Collapse a whole block with a button click# 1. Install Atomic Blocks plugin.# 2. Add new AB container.# 3. Add a code block inside the AB container.# 4. Add to a new post:bg_collapseview="link"color="#4286f4"icon="arrow"expand_text="Show More"collapse_text="Show Less"<divclass="wp-block-atomic-blocks-ab-container ab-block-container">
<divclass="ab-container-inside">
<divclass="ab-container-content"style="max-width:1600px">
Content1
</div>
</div>
</div>
/bg_collapse
# 5. Edit html:addthebg_collapseand/bg_collapsetagswrappedaroundbrackets[]aroundthediv
## Add skip links# 1. Add a new headline and edit the HTML.-Hoverovertheheadlineandclickthe3dots(moresettings)-Click'Edit as HTML'# 2. Add id="skipToHere" id for the tag<h2id="skipTo4">4.Addskiplinks<br></h2>
# 3. Write the link name to the top of the page.# 4. Paint the link name with your mouse.# 5. Click the 'paper clip' button and set the link to #skipToHere