Difference between revisions of "Adding Embed Whitelist Items"
From Dreamwidth Notes
m (jsfiddle) |
(→Current Whitelisted Embeds ( as of January 2017)) |
||
Line 15: | Line 15: | ||
[https://github.com/dreamwidth/dw-free/pull/1680 Add vid.me embeds, cover the other type of flickr videos] | [https://github.com/dreamwidth/dw-free/pull/1680 Add vid.me embeds, cover the other type of flickr videos] | ||
− | == Current Whitelisted Embeds ( as of | + | == Current Whitelisted Embeds ( as of June 2018) == |
* [http://www.4shared.com 4Shared] | * [http://www.4shared.com 4Shared] | ||
* [http://www.8tracks.com 8Tracks] | * [http://www.8tracks.com 8Tracks] | ||
+ | |||
+ | * [http://airtable.com Airtable] | ||
+ | * [http://www.archive.org Internet Archive] | ||
+ | |||
* [http://www.bandcamp.com Bandcamp] | * [http://www.bandcamp.com Bandcamp] | ||
* [http://www.blip.tv Blip.tv] | * [http://www.blip.tv Blip.tv] | ||
+ | * [http://www.box.com Box] | ||
+ | |||
* [http://cnn.com CNN] | * [http://cnn.com CNN] | ||
* [http://www.codepen.io Codepen] | * [http://www.codepen.io Codepen] | ||
+ | * [http://coub.com Coub] | ||
* [http://www.criticalcommons.org Critical Commons] | * [http://www.criticalcommons.org Critical Commons] | ||
+ | |||
* [http://www.dailymotion.com DailyMotion] | * [http://www.dailymotion.com DailyMotion] | ||
* [http://www.dotsub.com Dotsub] | * [http://www.dotsub.com Dotsub] | ||
+ | * [http://discordapp.com Discord] | ||
+ | |||
* [http://www.episodecalendar.com Episode Calendar] | * [http://www.episodecalendar.com Episode Calendar] | ||
+ | |||
* [http://www.facebook.com Facebook] | * [http://www.facebook.com Facebook] | ||
+ | |||
* [http://www.flickr.com Flickr] | * [http://www.flickr.com Flickr] | ||
+ | |||
* [http://www.goodreads.com GoodReads] | * [http://www.goodreads.com GoodReads] | ||
+ | * [http://giphy.com Giphy] | ||
+ | |||
+ | * [http://www.google.com Google] | ||
* [http://maps.google.com Google Maps] | * [http://maps.google.com Google Maps] | ||
* [http://calendar.google.com Google Calendar] | * [http://calendar.google.com Google Calendar] | ||
− | * [http://docs.google.com Google Docs] | + | * [http://docs.google.com Google Docs] (excluding forms, for security reasons) |
* [http://books.google.com Google Books] | * [http://books.google.com Google Books] | ||
+ | |||
* [http://www.imgur.com imgur] | * [http://www.imgur.com imgur] | ||
* [http://www.instagram.com Instagram] | * [http://www.instagram.com Instagram] | ||
− | + | ||
* [http://www.jigsawplanet.com Jigsaw Planet] | * [http://www.jigsawplanet.com Jigsaw Planet] | ||
+ | |||
* [http://jsfiddle.net JSFiddle] | * [http://jsfiddle.net JSFiddle] | ||
+ | |||
* [http://www.kickstarter.com Kickstarter] | * [http://www.kickstarter.com Kickstarter] | ||
− | * [http:// | + | |
− | * [http://www. | + | * [http://lichess.org lichess] |
+ | * [http://livejournal.com LiveJournal] | ||
+ | |||
+ | * [http://www.mixcloud.com Mixcloud] | ||
+ | * [http://www.msnbc.com MSNBC] | ||
+ | * [http://my.mail.ru my.mail.ru] | ||
+ | |||
* [http://www.nicovideo.jp NicoNico] | * [http://www.nicovideo.jp NicoNico] | ||
+ | * [http://noisetrade.com NoiseTrade] | ||
+ | * [http://www.npr.org National Public Radio] | ||
+ | |||
+ | * [http://onedrive.live.com Microsoft OneDrive] | ||
+ | |||
* [http://playmoss.com Playmoss] | * [http://playmoss.com Playmoss] | ||
* [http://www.plurk.com Plurk] | * [http://www.plurk.com Plurk] | ||
+ | |||
* [http://www.sbs.com.au SBS] | * [http://www.sbs.com.au SBS] | ||
+ | * [http://scratch.mit.edu Scratch - MIT] | ||
* [http://www.scribd.com Scribd] | * [http://www.scribd.com Scribd] | ||
* [http://www.slideshare.com Slideshare] | * [http://www.slideshare.com Slideshare] | ||
* [http://www.soundcloud.com SoundCloud] | * [http://www.soundcloud.com SoundCloud] | ||
* [http://www.spotify.com Spotify] | * [http://www.spotify.com Spotify] | ||
+ | |||
* [http://www.ted.com TED Talks] | * [http://www.ted.com TED Talks] | ||
+ | |||
* [http://www.vid.me vid.me] | * [http://www.vid.me vid.me] | ||
* [http://www.vimeo.com Vimeo] | * [http://www.vimeo.com Vimeo] | ||
* [http://www.vine.co Vine] | * [http://www.vine.co Vine] | ||
+ | * [http://vk.com VK] | ||
+ | |||
+ | * [http://fast.wistia.com Wistia] | ||
+ | |||
* [http://commons.wikimedia.org Wikimedia Commons] | * [http://commons.wikimedia.org Wikimedia Commons] | ||
+ | |||
* [http://www.yahoo.com Yahoo!] | * [http://www.yahoo.com Yahoo!] | ||
+ | |||
* [http://www.yandex.ru Yandex] | * [http://www.yandex.ru Yandex] | ||
+ | * [http://music.yandex.ru Yandex Music] | ||
+ | |||
* [http://www.youtube.com YouTube] | * [http://www.youtube.com YouTube] | ||
+ | |||
* [http://www.zippcast.com Zippcast] | * [http://www.zippcast.com Zippcast] | ||
[[Category: Development]] | [[Category: Development]] |
Revision as of 19:13, 15 June 2018
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)
- Google Maps
- Google Calendar
- Google Docs (excluding forms, for security reasons)
- Google Books