Difference between revisions of "Adding Embed Whitelist Items"

From Dreamwidth Notes
Jump to: navigation, search
(Current Whitelisted Embeds ( as of January 2017))
(blip.tv is dead and I'm tired of getting SEO spam mails about it)
 
(2 intermediate revisions by one other user not shown)
Line 22: Line 22:
 
* [http://airtable.com Airtable]
 
* [http://airtable.com Airtable]
 
* [http://www.archive.org Internet Archive]
 
* [http://www.archive.org Internet Archive]
 +
* [https://audiomack.com Audiomack]
  
 
* [http://www.bandcamp.com Bandcamp]
 
* [http://www.bandcamp.com Bandcamp]
* [http://www.blip.tv Blip.tv]
 
 
* [http://www.box.com Box]
 
* [http://www.box.com Box]
  
 +
* [https://chirb.it chirb.it]
 
* [http://cnn.com CNN]
 
* [http://cnn.com CNN]
 
* [http://www.codepen.io Codepen]
 
* [http://www.codepen.io Codepen]
Line 41: Line 42:
  
 
* [http://www.flickr.com Flickr]
 
* [http://www.flickr.com Flickr]
 +
* [http://funnyordie.com Funny or Die]
  
 
* [http://www.goodreads.com GoodReads]
 
* [http://www.goodreads.com GoodReads]
Line 64: Line 66:
  
 
* [http://www.mixcloud.com Mixcloud]
 
* [http://www.mixcloud.com Mixcloud]
 +
* [https://mixstep.co Mixstep]
 
* [http://www.msnbc.com MSNBC]
 
* [http://www.msnbc.com MSNBC]
 
* [http://my.mail.ru my.mail.ru]
 
* [http://my.mail.ru my.mail.ru]

Latest revision as of 19:18, 8 September 2023

Files you'll want to poke include:

cgi-bin/DW/Hooks/EmbedWhitelist.pm
t/embed-whitelist.t

In the code hook, most sites can be added to %host_path_match with a simple regular expression to test that the URL is in the expected format. The second argument is 1 or 0 depending on whether the site supports https connections or not - you should test this.

In the test suite, you'll want to add a simple check to make sure the URL you were given as a test case passes your check to be allowed on the site. See Dev Testing for more information about setting up and running the automated tests.


Example

Add flickr embeds to our whitelist, issue #720

Add vid.me embeds, cover the other type of flickr videos

Current Whitelisted Embeds ( as of June 2018)