This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var bookmarklet = { | |
init: function() { | |
this.parse(); | |
}, | |
parse: function() { | |
page = ""; | |
$(".Profile_Collection:visible") | |
.children(".centered_content") | |
.children(".collection") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{background:transparent;margin:0;} | |
#interactiveForm .fsForm .fsSubmit{ | |
background:none; | |
padding:0; | |
margin:0; | |
display: inline-block; | |
} | |
#interactiveForm .fsEmbed .fsPage{ | |
display:inline-block; | |
min-width:0 !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addTranslations(){ | |
var language = getParameter( "language"); | |
if (language === null) { | |
language = "english"; | |
} | |
var translations = { | |
english: { | |
"image": "english.png", | |
"label": "English", | |
"url": "#" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function share(){ | |
var shareWindow; | |
var twitterBaseUrl = "http://twitter.com/share?text="; | |
var facebookBaseUrl = "https://www.facebook.com/dialog/feed?display=popup&app_id=741666719251986&link="; | |
var articleUrl = "http://gu.com/p/4df2n"; | |
var urlsuffix = url.toString() ? "#p" + url : ""; | |
var shareUrl = articleUrl; | |
var message = this.get('shareMessage') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data; | |
var height = 600; | |
var width = 2000; | |
var blockWidth = 100; | |
d3.json('cleanresults.json',function(err,resp){ | |
data = [resp[0]]; | |
width = blockWidth*data[0].players.length; | |
doSomething(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"man city" : { | |
"fullname":"Manchester City", | |
"shortname":"man c", | |
"badge":"manchester-city.png" | |
}, | |
"arsenal" : { | |
"fullname":"Arsenal", | |
"shortname":"ars", | |
"badge":"arsenal.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
var liveblogUrl = "https://www.theguardian.com/politics/blog/live/2016/dec/02/liberal-democrats-celebrate-after-surprise-win-over-zac-goldsmith-in-brexit-byelection-live-reaction"; | |
var headlines = []; | |
function getLiveBlogData(){ | |
request(liveblogUrl, function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
var $ = cheerio.load(body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
& { | |
text-align: left; | |
border: none; | |
background: white; | |
display: block; | |
width: 100%; | |
height: 100%; | |
@media(min-width:820px){ | |
// min-height: 80vh; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import csv | |
country_codes = [ | |
"global", "gb", "ar", "at", "au", "be", "bo", "br", "ca", "ch", "cl", "co", "cr", "cz", "de", "dk", "do", "ec", "es", "fi", "fr", "gr", "gt", "hk", "hn", "hu", "id", "ie", "is", "it", "jp", "lt", "lv", "mx", "my", "nl", "no", "nz", "pa", "pe", "ph", "pl", "pt", "py", "se", "sg", "sk", "sv", "th", "tr", "tw", "us", "uy" | |
] | |
dates = [ | |
"2018-01-02", "2018-01-01", "2017-12-31", "2017-12-30", "2017-12-29", "2017-12-28", "2017-12-27", "2017-12-26", "2017-12-25", "2017-12-24", "2017-12-23", "2017-12-22", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is out of date, have a look at https://help.flourish.studio/article/21-controlling-stories-with-scrollytelling for more info |
OlderNewer