Enables any web page to become a rich object in a social graph.
-
Specs: https://ogp.me/.
-
Specs for sharing links: https://developers.facebook.com/docs/sharing/opengraph
import React from 'react'; | |
function Layout1({ children }) { | |
return ( | |
<> | |
<main>{children}</main> | |
<footer> | |
By you | |
</footer> | |
</> |
import { Skeleton } from '@mui/material'; | |
import { useTranslation } from 'next-i18next'; | |
import * as React from 'react'; | |
export interface Props { | |
textId: string; | |
width?: string; | |
} | |
/** |
// Copied for easier bookmarking from <https://github.com/vercel/next.js/issues/706#issuecomment-569041997> by @Lwdthe1 | |
// next.config.js | |
const aliasPathsToResolve = [ | |
{ name: 'components', path: path.resolve(__dirname, './components') }, | |
{ name: 'Common', path: path.resolve(__dirname, '../../common/react/') }, | |
] | |
module.exports = () => { | |
return { | |
webpack(config, { defaultLoaders }) { | |
config.module.rules.push({ |
export {}; | |
/** | |
* Extensions to the Typescript Date class. | |
*/ | |
declare global { | |
/** | |
* Extension members declarations. | |
*/ | |
interface Date { |
let observer = new IntersectionObserver( | |
(entries) => { | |
entries.forEach((entry, i) => { | |
if (entry.isIntersecting) { | |
const p = 2; | |
const c = document.createElement('canvas'); | |
const x = c.getContext('2d'); | |
c.width = 18; | |
c.height = 14; | |
const s = entry.target.innerText; |
// NodeJS based directory browsing and file serve without dependencies | |
// Joining code from <https://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http> | |
var fs = require("fs"), | |
http = require("http"); | |
http | |
.createServer(function (req, res) { | |
// Website you wish to allow to connect | |
res.setHeader("Access-Control-Allow-Origin", "*"); | |
Enables any web page to become a rich object in a social graph.
Specs: https://ogp.me/.
Specs for sharing links: https://developers.facebook.com/docs/sharing/opengraph
// <https://stackoverflow.com/a/4673436/2100126> | |
// First, checks if it isn't implemented yet. | |
if (!String.prototype.format) { | |
String.prototype.format = function() { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] | |
: match | |
; |
javascript:(function(){f='https://typefully.com/?new='+encodeURIComponent(document.title)+'%250A'+encodeURIComponent(window.location.href);a=function(){if(!window.open(f))location.href=f};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})() |