This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"constituencies": [ | |
{ | |
"id": 1, | |
"name": "Aberafan Maesteg", | |
"messages": [ | |
{ | |
"sender": "John Doe", | |
"content": "Message content 1" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// // .vscode/tasks.json | |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Run Vite", | |
"type": "shell", | |
"command": "pnpm run dev", | |
"presentation": { | |
"reveal": "silent", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Laracasts Theatre Mode: Add YouTube style tap 'T' for toggle theatre mode | |
// https://github.com/uzairfarooq/arrive | |
// prettier-ignore | |
const Arrive = function (e, t, n) { "use strict"; function r(e, t, n) { l.addMethod(t, n, e.unbindEvent), l.addMethod(t, n, e.unbindEventWithSelectorOrCallback), l.addMethod(t, n, e.unbindEventWithSelectorAndCallback) } function i(e) { e.arrive = f.bindEvent, r(f, e, "unbindArrive"), e.leave = d.bindEvent, r(d, e, "unbindLeave") } if (e.MutationObserver && "undefined" != typeof HTMLElement) { var o = 0, l = function () { var t = HTMLElement.prototype.matches || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; return { matchesSelector: function (e, n) { return e instanceof HTMLElement && t.call(e, n) }, addMethod: function (e, t, r) { var i = e[t]; e[t] = function () { return r.length == arguments.length ? r.apply(this, arguments) : "function" == typeof i ? i.apply(this, arguments) : n } }, ca |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const styleElements = document.querySelectorAll( | |
'link[rel="stylesheet"], style' | |
); | |
const inlineStyleElements = document.querySelectorAll("[style]"); | |
for (const styleElement of styleElements) { | |
if (styleElement.parentNode) { | |
styleElement.parentNode.removeChild(styleElement); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
section#main::before { | |
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), | |
url("https://action.mungos.org/sites/stmungos/files/styles/full/public/christmas-background.jpg"); | |
background-repeat: no-repeat; | |
background-size: cover; | |
content: ""; | |
position: fixed; /* Fix position to cover whole area */ | |
top: 0; | |
left: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Also this in on-page CSS | |
// @keyframes fadeIn { | |
// 0% {opacity: 0;} | |
// 100% {opacity: 1;} | |
// } | |
// .fade-in { | |
// animation: fadeIn 1s; | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>hello from github html gist saved in gistpad</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("hello from a github gist"); | |
const title = document.querySelector(`h1#page-title`); | |
// Function to get the current time in HH:MM:SS format | |
function getCurrentTime() { | |
const now = new Date(); | |
const hours = String(now.getHours()).padStart(2, '0'); | |
const minutes = String(now.getMinutes()).padStart(2, '0'); | |
const seconds = String(now.getSeconds()).padStart(2, '0'); | |
return `${hours}:${minutes}:${seconds}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: salmon; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
* A script to fetch and apply JS and CSS from GitHub gists and GitLab snippets. | |
* Use with the Gistpad extension in VS Code for easy updating: | |
* https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs | |
* | |
* Note: For GitLab, it's likely the content fetch will fail due to CORS restrictions. | |
* With GitHub, rate limiting can be strict unless the gist is public. | |
* | |
* For html gists, specify the target using the html selector of an element on your page. |
NewerOlder