Skip to content

Commit

Permalink
Update content-update.js
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai committed May 30, 2024
1 parent da8b18f commit f3f910a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/content-update.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { getMetadata } from './utils.js';

export const REG = /\[\[(.*?)\]\]/g;

const preserveFormatKeys = [
'description',
];

function getMetadata(name, doc = document) {
const attr = name && name.includes(':') ? 'property' : 'name';
const meta = doc.head.querySelector(`meta[${attr}="${name}"]`);
return meta && meta.content;
}

function handleRegisterButton(a) {
const urlParams = new URLSearchParams(window.location.search);
const devMode = urlParams.get('devMode');
Expand Down

0 comments on commit f3f910a

Please sign in to comment.