Skip to content

Commit

Permalink
Merge pull request #61 from joelthorner/2.x
Browse files Browse the repository at this point in the history
2.1.7
  • Loading branch information
joelthorner authored Nov 5, 2018
2 parents 05f89cf + b30b16e commit 77f4979
Show file tree
Hide file tree
Showing 13 changed files with 1,143 additions and 32 deletions.
1,078 changes: 1,078 additions & 0 deletions css/inject/lc-holidays.css

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/main.css.map

Large diffs are not rendered by default.

Binary file modified fonts/Deus-Antics.ttf
Binary file not shown.
Binary file modified fonts/Deus-Antics.woff
Binary file not shown.
Binary file modified fonts/Deus-Antics.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions js/inject/background-lc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ chrome.storage.sync.get('optLcBgValue', function(items) {
chrome.storage.sync.set({
optLcBgValue: {
image: oldBg,
thumb: oldBg,
userName: 'Joel Thorner',
userLink: 'https://github.com/joelthorner'
}
Expand Down
24 changes: 17 additions & 7 deletions js/inject/lc-holidays.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions js/inject/steal-font-awesome.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ chrome.storage.sync.get(['optDevStealFa'], function(result) {
return str.replace(new RegExp(escapeRegExp(find), 'g'), replace);
}

var ready = $('.showNavStyles');
var ready = $('[data-balloon*="size"]');

var si = setInterval(function() {
ready = $('.showNavStyles');
ready = $('[data-balloon*="size"]');

if (ready.length) {
clearInterval(si);
Expand Down Expand Up @@ -92,8 +92,8 @@ chrome.storage.sync.get(['optDevStealFa'], function(result) {
</div>
`);

var $svgP = $('.showNavStyles').find('span[data-balloon="size: 2x"] > svg[data-icon]').parent();
var name = $.trim($('.showNavStyles h1').text());
var $svgP = $('[data-balloon="size: 2x"] > svg[data-icon]').parent();
var name = $.trim($('h1 [data-balloon]').text());

var out_svg = $svgP.html();
out_svg = out_svg.replace(new RegExp('data-prefix="[a-z]{3}"\\s', "g"), '');
Expand Down
17 changes: 11 additions & 6 deletions js/optionsActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ chrome.storage.sync.get('optLcBgValue', function(items) {
chrome.storage.sync.set({
optLcBgValue: {
image: oldBg,
thumb: oldBg,
userName: 'Joel Thorner',
userLink: 'https://github.com/joelthorner'
}
Expand All @@ -18,6 +19,7 @@ var defaults = {
optLcBgActive: true,
optLcBgValue: {
image: chrome.extension.getURL('img/background-default.jpg'),
thumb: chrome.extension.getURL('img/background-default.jpg'),
userName: 'Matteo Fusco',
userLink: 'https://unsplash.com/@matteofusco?utm_source=TLmanaGer&utm_medium=referral'
},
Expand All @@ -42,6 +44,7 @@ function saveOptions(deelay) {
optLcBgActive: $('#opt-lc-bg-active').prop('checked'),
optLcBgValue: {
image: $('[name="opt-lc-bg"]:checked').val(),
thumb: $('[name="opt-lc-bg"]:checked').parents('.background-item').find('label').css('background-image').replace('url("', '').replace('")', ''),
userName: $('[name="opt-lc-bg"]:checked').parents('.background-item').find('a').text(),
userLink: $('[name="opt-lc-bg"]:checked').parents('.background-item').find('a').attr('href')
},
Expand Down Expand Up @@ -90,9 +93,9 @@ function restoreOptions() {

$('#opt-lc-bg-image')
.find('label')
.css('background-image', 'url(' + items.optLcBgValue.image.replace('w=1920', 'w=200') + ')')
.css('background-image', 'url(' + items.optLcBgValue.thumb + ')')
.prev('input')
.val(items.optLcBgValue.image.replace('w=1920', 'w=200'))
.val(items.optLcBgValue.thumb)
.parent().find('a').attr('href', items.optLcBgValue.userLink).text(items.optLcBgValue.userName);

$('#opt-lc-pagrid-active')
Expand Down Expand Up @@ -203,14 +206,15 @@ function imagesPaginator(jsonResponse, actualPage) {
`);
mdc.ripple.MDCRipple.attachTo(document.getElementById('load-more-bg'));
}
execMasonry();
}

function createImages(imagesList) {
if (imagesList.length) {
$.each(imagesList, function(index, obj) {
$('.grid-backgrounds').append(`
<div class="background-item">
<input type="radio" id="bg-radio-${obj.id}" name="opt-lc-bg" value="${obj.urls.thumb.replace('w=200', 'w=1920')}">
<input type="radio" id="bg-radio-${obj.id}" name="opt-lc-bg" value="${obj.links.download}">
<label class="aspect16by9" for="bg-radio-${obj.id}" style="background-image: url(${obj.urls.thumb});background-color: ${obj.color};"></label>
<a href="${obj.user.links.html}?utm_source=TLmanaGer&utm_medium=referral" target="_blank">${obj.user.name}</a>
</div>
Expand All @@ -223,6 +227,7 @@ function createImages(imagesList) {
</div>
`);
}
execMasonry();
}

$(document).ready(function() {
Expand All @@ -238,15 +243,15 @@ $(document).ready(function() {
$('.background-item').removeClass('active');
$(this).parents('.background-item').addClass('active');

var $selct = $(this);
var $selected = $(this);
var link = $(this).parents('.background-item').find('a').attr('href');
var name = $(this).parents('.background-item').find('a').text();

$('#opt-lc-bg-image')
.find('label')
.css('background-image', 'url(' + $selct.val().replace('w=1920', 'w=200') + ')')
.css('background-image', $selected.parent().find('label').css('background-image'))
.prev('input')
.val($selct.val().replace('w=1920', 'w=200'))
.val($selected.val())
.parent().find('a').attr('href', link).text(name);
});

Expand Down
10 changes: 10 additions & 0 deletions js/optionsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ var AVATARS /* The legend of Aang */ = [
var CHANGELOG = [

{
version: "2.1.7",
date: "05 Nov 2018",
lines: [
"Add responsive support options page",
"Update DEUS ANTICS font",
"Fix Unsplash API requirements",
"Fix steal FA",
"Update next holidays"
]
}, {
version: "2.1.6",
date: "1 Nov 2018",
lines: [
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "2.1.6",
"version": "2.1.7",
"manifest_version": 2,
"description": "__MSG_appDesc__",
"homepage_url": "https://github.com/joelthorner/TLmanaGer",
Expand Down
11 changes: 0 additions & 11 deletions src/popup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,6 @@ <h1 class="title">TLmanaGer</h1>
</div>
</button>
</div>

<!-- <div class="item-grid">
<button class="btn-action mdc-ripple-surface" data-mdc-auto-init="MDCRipple" type="button">
<div class="wrap">
<div class="inset">
<svg class="icon" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm128 421.6c-35.9 26.5-80.1 42.4-128 42.4s-92.1-15.9-128-42.4V416c0-35.3 28.7-64 64-64 11.1 0 27.5 11.4 64 11.4 36.6 0 52.8-11.4 64-11.4 35.3 0 64 28.7 64 64v13.6zm30.6-27.5c-6.8-46.4-46.3-82.1-94.6-82.1-20.5 0-30.4 11.4-64 11.4S204.6 320 184 320c-48.3 0-87.8 35.7-94.6 82.1C53.9 363.6 32 312.4 32 256c0-119.1 96.9-216 216-216s216 96.9 216 216c0 56.4-21.9 107.6-57.4 146.1zM248 120c-48.6 0-88 39.4-88 88s39.4 88 88 88 88-39.4 88-88-39.4-88-88-88zm0 144c-30.9 0-56-25.1-56-56s25.1-56 56-56 56 25.1 56 56-25.1 56-56 56z"></path></svg>
<span class="text"><span>Confirm account form</span></span>
</div>
</div>
</button>
</div> -->
</div>
</div>

Expand Down

0 comments on commit 77f4979

Please sign in to comment.