User:Aesulus/common.js: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
function getPekoCookie(key) {
function getPekoCookie(key) {
const matchArray = document.cookie.match(new RegExp('\b' + key + '=([^;]+)'));
const matchArray = document.cookie.match(new RegExp('\\b' + key + '=([^;]+)'));
return (matchArray == null) ? null : matchArray[1];
return (matchArray == null) ? null : matchArray[1];