Skip to content

Instantly share code, notes, and snippets.

@ahidalgob
Last active November 12, 2020 02:35
Show Gist options
  • Select an option

  • Save ahidalgob/ff388b1dd04fac5b51fa01f10e5542d5 to your computer and use it in GitHub Desktop.

Select an option

Save ahidalgob/ff388b1dd04fac5b51fa01f10e5542d5 to your computer and use it in GitHub Desktop.
Makes embeds work :)
// ==UserScript==
// @name Notion embeds
// @namespace http://tampermonkey.net/
// @version 0.1
// @description make embeds better :)
// @author ahidalgob
// @match https://www.notion.so/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
$(document).ready(function() {
setInterval(function(){
$.each($( ".notion-embed-block" ), function( i, val ) {
try{
var lnk = $($(val.children)[0].children)[1].textContent
console.log(lnk);
if(lnk.substring(0, 4) == "src="){
lnk = lnk.substring(4)
$('iframe', $($(val.children)[0].children)).attr('src', lnk);
}
}catch(err){
}
});
}, 20000);
});
div.notion-list-view {
padding-left: 2px !important;
padding-right: 2px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment