@knight-lab/timelinejs
Advanced tools
Comparing version 3.8.8 to 3.8.9
{ | ||
"name": "@knight-lab/timelinejs", | ||
"version": "3.8.8", | ||
"version": "3.8.9", | ||
"license": "MPL-2.0", | ||
@@ -5,0 +5,0 @@ "description": "TimelineJS v3: A Storytelling Timeline built in JavaScript, made by Northwestern University Knight Lab.", |
@@ -86,3 +86,8 @@ /* Adapted from okfn/csv.js under MIT license | ||
return { | ||
fields: rows[0].map(x => x.trim()), | ||
fields: rows[0].map((x, i) => { | ||
if (x && x.trim) { | ||
return x.trim() | ||
} | ||
return `untitled${i}` | ||
}), | ||
records: rows.slice(1) | ||
@@ -89,0 +94,0 @@ }; |
@@ -150,3 +150,3 @@ /* | ||
name: "Google Doc", | ||
match_str: "^(https?:)?\/*[^.]*.google.com\/[^\/]*\/d\/[^\/]*\/[^\/]*\?usp=sharing|^(https?:)?\/*drive.google.com\/open\?id=[^\&]*\&authuser=0|^(https?:)?\/*drive.google.com\/open\?id=[^\&]*|^(https?:)?\/*[^.]*.googledrive.com\/host\/[^\/]*\/", | ||
match_str: "^(https?:)?\/*[^.]*.google.com\/[^\/]*\/d\/[^\/]*\/[^\/]*\?usp=sharing|^(https?:)?\/*drive.google.com\/open\?id=[^\&]*\&authuser=0|^(https?:)?\/\/*drive.google.com\/open\\?id=[^\&]*|^(https?:)?\/*[^.]*.googledrive.com\/host\/[^\/]*\/", | ||
cls: GoogleDoc | ||
@@ -153,0 +153,0 @@ }, |
@@ -15,7 +15,5 @@ import { Media } from "../Media"; | ||
// Get Media ID | ||
if (this.data.url.match("open\?id\=")) { | ||
this.media_id = this.data.url.split("open\?id\=")[1]; | ||
if (this.data.url.match("\&authuser\=0")) { | ||
url = this.media_id.match("\&authuser\=0")[0]; | ||
}; | ||
if (this.data.url.match(/open\?id=([^&]+)/)) { | ||
var doc_id = this.data.url.match(/open\?id=([^&]+)/)[1]; | ||
url = 'https://drive.google.com/file/d/' + doc_id + '/preview' | ||
} else if (this.data.url.match(/file\/d\/([^/]*)\/?/)) { | ||
@@ -22,0 +20,0 @@ var doc_id = this.data.url.match(/file\/d\/([^/]*)\/?/)[1]; |
@@ -208,3 +208,5 @@ import * as DOM from "../dom/DOM" | ||
if (this.options.font && this.options.font.indexOf('http') == 0) { | ||
if (this.options.font && ( | ||
this.options.font.indexOf('http') == 0 || | ||
this.options.font.match(/^[^A-Za-z]/))) { | ||
font_css_url = this.options.font | ||
@@ -211,0 +213,0 @@ } else if (this.options.font) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5365628
417
23287