Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Manually Adding Domains to the Whitelist

Sean McGregor edited this page Jan 11, 2013 · 4 revisions

If you want to play with your own content server before we finish Masked, this is the guide for you. Each of the extensions comes with a content script called privly.js. This Javascript file contains a regular expression:

privlyReferencesRegex: new RegExp(
  "\^(https?:\\/\\/){0,1}(" + //protocol
  "priv\\.ly\\/|" + //priv.ly
  "dev\\.privly\\.org\\/|" + //dev.privly.org
  "localhost\\/|" + //localhost
  "privlyalpha.org\\/|" + //privlyalpha.org
  "privlybeta.org\\/|" + //privlybeta.org
  "localhost:3000\\/" + //localhost:3000
  ")(\\S){3,}$","gi"),

If your domain is yourdomain.com, you only need to add:

"yourdomain.com\\/|" +

like so:

privlyReferencesRegex: new RegExp(
  "\^(https?:\\/\\/){0,1}(" + //protocol
  "yourdomain.com\\/|" +
  "priv\\.ly\\/|" + //priv.ly
  "dev\\.privly\\.org\\/|" + //dev.privly.org
  "localhost\\/|" + //localhost
  "privlyalpha.org\\/|" + //privlyalpha.org
  "privlybeta.org\\/|" + //privlybeta.org
  "localhost:3000\\/" + //localhost:3000
  ")(\\S){3,}$","gi"),