From a8e3743eb5fc3cd1f5ebc0f678b9d0906cddb804 Mon Sep 17 00:00:00 2001 From: Damien Erambert Date: Wed, 10 Aug 2016 23:51:33 -0700 Subject: [PATCH] :cookie: changelog section in settings --- NEWS | 2 +- gulpfile.babel.js | 13 +++++---- package.json | 1 + src/_locales/en/messages.json | 1 + src/_locales/fr/messages.json | 1 + src/css/options/index.css | 54 +++++++++++++++++++++++++++++++++-- src/js/content.js | 2 +- src/manifest.json | 2 +- src/options/options.html | 10 ++++++- src/options/options.js | 12 ++++++++ 10 files changed, 86 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index a98260a02..4bb1ced84 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -3.0.12 (To be released) +:tada: 3.0.12 :tada: =============== - [Fix] Verified badges should display correctly when relevant - [Fix] Bring back the like/RT indicator on tweets because TweetDeck killed it diff --git a/gulpfile.babel.js b/gulpfile.babel.js index da7055b92..2114b343c 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -84,9 +84,9 @@ gulp.task('clean', () => del(['dist/'])); * Simply copy files like images/json to the build folder * */ -gulp.task('static', () => ( - gulp.src(staticFiles, { base: './src' }).pipe(gulp.dest('./dist')) -)); +gulp.task('static', () => gulp.src(staticFiles, { base: './src' }).pipe(gulp.dest('./dist')) ); + +gulp.task('static-news', () => gulp.src('./NEWS').pipe(gulp.dest('./dist/options/')) ); /* * @@ -152,7 +152,7 @@ gulp.task('lint', () => ( * */ gulp.task('build', (done) => { - runSequence('clean', ['js', 'static', 'css', 'css-options'], done); + runSequence('clean', ['js', 'static', 'css', 'css-options'], 'static-news', done); }); /* @@ -162,10 +162,11 @@ gulp.task('build', (done) => { * */ gulp.task('default', (done) => { - runSequence('clean', ['css', 'css-options', 'js', 'static'], () => { + runSequence('clean', ['css', 'css-options', 'js', 'static'], 'static-news', () => { gulp.watch(['./src/js/**/*.js', './src/options/*.js'], ['js', 'js-options']); gulp.watch(['./src/css/**/*.css'], ['css', 'css-options']); - gulp.watch(staticFiles, ['static']); + gulp.watch(staticFiles, ['static', 'static-news']); + gulp.watch('./NEWS', ['static-news']); done(); }); }); diff --git a/package.json b/package.json index 2f7b0e95d..3581e9a12 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "jquery": "^3.0.0", "js-emoji": "https://github.com/iamcal/js-emoji/tarball/v3.0.2", "lodash": "^4.0.0", + "marked": "^0.3.6", "mustache": "^2.2.1", "needle": "^1.0.0", "normalize.css": "^4.1.1", diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 74027f6bd..d3aa3d951 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -14,6 +14,7 @@ "sec_content": { "message": "Content" }, "sec_welcome": { "message": "Welcome" }, "sec_credits": { "message": "Credits / About" }, + "sec_changelog": { "message": "Changelog" }, "sec_debug": { "message": "Debug Infos" }, "sec_links": { "message": "Links" }, "sec_donate": { "message": "Donate" }, diff --git a/src/_locales/fr/messages.json b/src/_locales/fr/messages.json index 25e24ce48..d7a10454e 100644 --- a/src/_locales/fr/messages.json +++ b/src/_locales/fr/messages.json @@ -14,6 +14,7 @@ "sec_content": { "message": "Contenu" }, "sec_welcome": { "message": "Bienvenue" }, "sec_credits": { "message": "Crédits / A Propos" }, + "sec_changelog": { "message": "Nouveautés" }, "sec_debug": { "message": "Déboggage" }, "sec_links": { "message": "Liens" }, "sec_donate": { "message": "Faire un don" }, diff --git a/src/css/options/index.css b/src/css/options/index.css index 157563ef1..d2acbd72e 100644 --- a/src/css/options/index.css +++ b/src/css/options/index.css @@ -1,5 +1,5 @@ @import "normalize.css"; -@import "../../../node_modules/prismjs/themes/prism.css"; +@import "../../../node_modules/prismjs/themes/prism-solarizedlight.css"; @import "./save-bar.css"; @import "./sidebar.css"; @@ -106,8 +106,11 @@ body { column-count: 2; } - ul, ol { + &:not(.changelog) :matches(ul, ol) { list-style: none; + } + + ul, ol { padding-left: .7em; font-size: 14px; @@ -175,3 +178,50 @@ body { } } } + +span.emoji { + display: -moz-inline-box; + -moz-box-orient: vertical; + display: inline-block; + vertical-align: baseline; + *vertical-align: auto; + *zoom: 1; + *display: inline; + width: 1em; + height: 1em; + background-size: 1em; + background-repeat: no-repeat; + text-indent: -9999px; + background-position: 50%, 50%; + background-size: contain; +} + +span.emoji-sizer { + line-height: 0.81em; + font-size: 1em; + margin: -2px 0; +} + +span.emoji-outer { + display: -moz-inline-box; + display: inline-block; + *display: inline; + height: 1em; + width: 1em; +} + +span.emoji-inner { + display: -moz-inline-box; + display: inline-block; + text-indent: -9999px; + width: 100%; + height: 100%; + vertical-align: baseline; + *vertical-align: auto; + *zoom: 1; +} + +img.emoji { + width: 1em; + height: 1em; +} diff --git a/src/js/content.js b/src/js/content.js index 3f8044b42..e39634ed5 100644 --- a/src/js/content.js +++ b/src/js/content.js @@ -434,7 +434,7 @@ on('BTDC_ready', () => { const settingsBtn = `
Better TweetDeck Settings
`; - $('nav.app-navigator')[0].insertAdjacentHTML('beforeend', settingsBtn); + $('nav.app-navigator')[0].insertAdjacentHTML('afterbegin', settingsBtn); $('.btd-settings-btn')[0].addEventListener('click', (e) => { e.preventDefault(); window.open(settingsURL); diff --git a/src/manifest.json b/src/manifest.json index ecf26d0bc..54fd84b2d 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -42,5 +42,5 @@ "chrome_style": false }, "web_accessible_resources": ["js/inject.js", "js/content.js.map", "js/inject.js.map", "js/background.js.map", "emojis/sheet_twitter_64.png", "emojis/emoji-happy.svg", "icons/controller-play.svg", "options/options.html"], - "content_security_policy": "img-src 'self' *; default-src; connect-src * https:" + "content_security_policy": "img-src 'self' *; default-src; connect-src * https:; style-src 'unsafe-inline'" } diff --git a/src/options/options.html b/src/options/options.html index 1dfce0478..3b868aed4 100644 --- a/src/options/options.html +++ b/src/options/options.html @@ -33,6 +33,7 @@ @@ -292,7 +293,14 @@
Settings dump
- + + +
+

Changelog

+ +
+ +