diff --git a/better-envato.js b/better-envato.js index b21927f..3a9e58e 100644 --- a/better-envato.js +++ b/better-envato.js @@ -3,27 +3,30 @@ Name: Better Envato Keywords: make Envato Better Created by: Surjith S M © 2015-2020 */ -var username, apikey, openexchange, currency, localise_earnings, localise_earnings_table, localise_earnings_page, hide_statement, verify_purchase, create_hrefs; - +var username, apikey, openexchange, currency, localise_earnings, localise_earnings_table, localise_earnings_page, hide_statement, verify_purchase, create_hrefs, old_forum_look, close_iframe_preview; chrome.runtime.sendMessage({ method: "getLocalStorage", - keys: ["username", "apikey", "openexchange", "currency", "localise_earnings", 'localise_earnings_table', 'localise_earnings_page', 'hide_statement', 'verify_purchase', 'create_hrefs', 'hide_earnings' ] + keys: ["username", "apikey", "openexchange", "currency", "localise_earnings", 'localise_earnings_table', 'localise_earnings_page', 'hide_statement', 'verify_purchase', 'create_hrefs', 'hide_earnings', 'old_forum_look', 'close_iframe_preview'] }, function(response) { - username = response.data.username; - apikey = response.data.apikey; - openexchange = response.data.openexchange; - currency = response.data.currency; - localise_earnings = response.data.localise_earnings; + username = response.data.username; + apikey = response.data.apikey; + openexchange = response.data.openexchange; + currency = response.data.currency; + localise_earnings = response.data.localise_earnings; localise_earnings_table = response.data.localise_earnings_table; - localise_earnings_page = response.data.localise_earnings_page; - hide_statement = response.data.hide_statement; - verify_purchase = response.data.verify_purchase; - create_hrefs = response.data.create_hrefs; - hide_earnings = response.data.hide_earnings; + localise_earnings_page = response.data.localise_earnings_page; + hide_statement = response.data.hide_statement; + verify_purchase = response.data.verify_purchase; + create_hrefs = response.data.create_hrefs; + hide_earnings = response.data.hide_earnings; + old_forum_look = response.data.old_forum_look; + close_iframe_preview = response.data.close_iframe_preview; } ); - +/*hide_forum_posts = response.data.hide_forum_posts; + forum_blacklist = response.data.forum_blacklist; + forum_whitelist = response.data.forum_whitelist;*/ $(document).ready(function() { if (localise_earnings != 'false') { if (username == 'undefined' || apikey == 'undefined' || openexchange == 'undefined') { @@ -32,9 +35,7 @@ $(document).ready(function() { dollartToInr(); } } - }); - //function for converting string into indian currency format function inr_currency(nStr) { nStr += ''; @@ -45,7 +46,6 @@ function inr_currency(nStr) { var z = 0; var len = String(x1).length; var num = parseInt((len / 2) - 1); - while (rgx.test(x1)) { if (z > 0) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); @@ -61,29 +61,22 @@ function inr_currency(nStr) { } return x1 + x2; } - // GLOBAL CURRENCY FORMAT function format_currency(n) { return n.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,"); } function dollartToInr() { - var posturl = 'http://marketplace.envato.com/api/edge/' + username + '/' + apikey + '/account.json'; + var posturl = 'https://marketplace.envato.com/api/edge/' + username + '/' + apikey + '/account.json'; var earningsdollar, finalearnings, convertrate; - - var conversionurl = 'http://openexchangerates.org/api/latest.json?app_id=' + openexchange; - + var conversionurl = 'https://openexchangerates.org/api/latest.json?app_id=' + openexchange; // Use jQuery.ajax to get the latest exchange rates, with JSONP: - $.getJSON(conversionurl, function(data) { convertrate = data.rates[currency]; /* * 0.975 Midmarket rate*/ - - console.log(data); - + console.log(data); $.getJSON(posturl, function(data) { earningsdollar = data.account.available_earnings; /*- 3 payoneer commision $3*/ finalearnings = earningsdollar * convertrate; - if (currency == 'INR') { currency_sign = '₹'; } else if (currency == 'EUR') { @@ -93,30 +86,24 @@ function dollartToInr() { } else { currency_sign = currency; } - if (currency == 'INR') { $('.header-logo-account__balance').text(currency_sign + ' ' + inr_currency(finalearnings.toFixed(2))).parent().attr('title', 'Actual Earnings: $' + earningsdollar); } else { $('.header-logo-account__balance').text(currency_sign + ' ' + format_currency(finalearnings)).parent().attr('title', 'Actual Earnings: $' + earningsdollar); } - }); }); } function convertPrice(unconverted_price, handleData) { var conversion_rate, converted_price; - - if($.type(unconverted_price) === 'string') { + if ($.type(unconverted_price) === 'string') { unconverted_price = unconverted_price.replace(/[^0-9\.]/g, ''); } - $.ajax({ - url: 'http://openexchangerates.org/api/latest.json?app_id=' + openexchange, - success:function(data){ - + url: 'https://openexchangerates.org/api/latest.json?app_id=' + openexchange, + success: function(data) { conversion_rate = data.rates[currency]; - if (currency == 'INR') { currency_sign = '₹'; } else if (currency == 'EUR') { @@ -126,101 +113,92 @@ function convertPrice(unconverted_price, handleData) { } else { currency_sign = currency; } - converted_price = unconverted_price * conversion_rate; - if (currency == 'INR') { converted_price = currency_sign + ' ' + inr_currency(converted_price.toFixed(2)); } else { converted_price = currency_sign + ' ' + format_currency(converted_price); } - handleData(converted_price); } }); } - $(document).ready(function() { - // REMOVE STATEMENTS - AUTHOR FEE // CONVERT CURRENCIES - - if (hide_statement != 'false') { - var pathname = window.location.pathname; - var amount = 0; - var amount_string = ''; - var order_id = 0; - var next_amount = ''; - - var unconverted, converted, current_object = [], conversion_rate; - - if (pathname.indexOf('statement') > -1) { - $("#stored_statement").find("tr").each(function(i) { - - if ($(this).find("td").eq(3).find("span").text() == "Author Fee") { - - order_id = $(this).find('.statement__order_id').text(); - amount_string = $(this).find('.statement__amount').text(); - amount = parseFloat(amount_string.substring(1, amount_string.length)); - next_amount = $(this).next().find('.statement__amount').text(); - next_amount = parseFloat(next_amount.substring(1, next_amount.length)); - - amount = amount + next_amount; - - $(this).next().find('.statement__amount').text('$' + amount.toFixed(2)); - $(this).hide(); - } - - if(localise_earnings_table != 'false') { - if (openexchange == 'undefined') { - return false; - } else { - if ($(this).is(':visible')) { - current_object[i] = $(this); - - if (current_object[i].find('td').eq(7).text() != '') { - unconverted = current_object[i].find('td').eq(7).text(); - unconverted = parseFloat(unconverted.substring(1, unconverted.length)); - - converted = convertPrice(unconverted, function(data){ - current_object[i].find('td').eq(7).text(data).attr('title', 'Actual Earnings: $' + unconverted); - }); - } - if (current_object[i].find('td').eq(8).text() != '') { - unconverted = current_object[i].find('td').eq(8).text(); - unconverted = unconverted.substring(1, unconverted.length); - converted = convertPrice(unconverted, function(data){ - current_object[i].find('td').eq(8).text(data).attr('title', 'Actual Earnings: $' + unconverted); - }); - } - } - } - } - }); - } - } - + // TODO : SUPPORT PACKS LAUNCHED NEED RE_WORK + /* if (hide_statement != 'false') { + var pathname = window.location.pathname; + var amount = 0; + var amount_string = ''; + var order_id = 0; + var next_amount = ''; + + var unconverted, converted, current_object = [], conversion_rate; + + if (pathname.indexOf('statement') > -1) { + $("#stored_statement").find("tr").each(function(i) { + + if ($(this).find("td").eq(3).find("span").text() == "Author Fee") { + + order_id = $(this).find('.statement__order_id').text(); + amount_string = $(this).find('.statement__amount').text(); + amount = parseFloat(amount_string.substring(1, amount_string.length)); + next_amount = $(this).next().find('.statement__amount').text(); + next_amount = parseFloat(next_amount.substring(1, next_amount.length)); + + amount = amount + next_amount; + + $(this).next().find('.statement__amount').text('$' + amount.toFixed(2)); + $(this).hide(); + } + + if(localise_earnings_table != 'false') { + if (openexchange == 'undefined') { + return false; + } else { + if ($(this).is(':visible')) { + current_object[i] = $(this); + + if (current_object[i].find('td').eq(7).text() != '') { + unconverted = current_object[i].find('td').eq(7).text(); + unconverted = parseFloat(unconverted.substring(1, unconverted.length)); + + converted = convertPrice(unconverted, function(data){ + current_object[i].find('td').eq(7).text(data).attr('title', 'Actual Earnings: $' + unconverted); + }); + } + if (current_object[i].find('td').eq(8).text() != '') { + unconverted = current_object[i].find('td').eq(8).text(); + unconverted = unconverted.substring(1, unconverted.length); + converted = convertPrice(unconverted, function(data){ + current_object[i].find('td').eq(8).text(data).attr('title', 'Actual Earnings: $' + unconverted); + }); + } + } + } + } + }); + } + } */ // CONVERT CURRENCIES IN EARNINGS TAB - if(localise_earnings_page != 'false') { + if (localise_earnings_page != 'false') { var pathname = window.location.pathname; - if(pathname.indexOf('/earnings/') > -1) { - + if (pathname.indexOf('/earnings/') > -1) { // Generate new graph var graph_data = $.parseJSON($('body script[id="graphdata"]').text()); var current_object, unconverted, converted, data_indexes, counter; counter = 0; data_indexes = graph_data.datasets[0]['data'].length; - - $.each(graph_data.datasets[0]['data'], function(i, val){ - if(val > 0) { + $.each(graph_data.datasets[0]['data'], function(i, val) { + if (val > 0) { // Localize if (openexchange == 'undefined') { return false; } else { current_object = $(this); unconverted = parseFloat(val); - - converted = convertPrice(unconverted, function (data) { + converted = convertPrice(unconverted, function(data) { if (parseFloat(data.replace(/[^0-9\.]/g, '')) > 0) { graph_data.datasets[0]['data'][i] = parseFloat(data.replace(/[^0-9\.]/g, '')); counter++; @@ -231,85 +209,74 @@ $(document).ready(function() { counter++; } }); - - var renderGraph = setInterval(function(){ - if(data_indexes == counter) { - $('.-sales').text('Sales Earnings ('+currency+')'); - + var renderGraph = setInterval(function() { + if (data_indexes == counter) { + $('.-sales').text('Sales Earnings (' + currency + ')'); var chart_data = { animationEasing: "easeInOutCirc", animationSteps: 60, scaleFontSize: 12, scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", - scaleLabel: "<%=parseFloat(value).toLocaleString('en-EN', {style: 'currency', currency: '"+currency+"', minimumFractionDigits: 2})%>", + scaleLabel: "<%=parseFloat(value).toLocaleString('en-EN', {style: 'currency', currency: '" + currency + "', minimumFractionDigits: 2})%>", scaleStartValue: 0, showTooltips: !1, bezierCurve: !1 }; - $(".js-graph__canvas").remove(); $('.graph__container').append(''); - var canvas = $(".graph__canvas").get(0).getContext('2d'); new Chart(canvas).Line(graph_data, chart_data); - clearInterval(renderGraph); } }, 100); - // Convert headers (This month, balance, total value) - convertPrice($('.earnings-widget__amount:eq(0)').text().substr(1), function(data){ + convertPrice($('.earnings-widget__amount:eq(0)').text().substr(1), function(data) { $('.earnings-widget__amount:eq(0)').text(data); }); - convertPrice($('.earnings-widget__amount:eq(1)').text().substr(1), function(data){ + convertPrice($('.earnings-widget__amount:eq(1)').text().substr(1), function(data) { $('.earnings-widget__amount:eq(1)').text(data); }); - convertPrice($('.earnings-widget__amount:eq(2)').text().substr(1), function(data){ + convertPrice($('.earnings-widget__amount:eq(2)').text().substr(1), function(data) { $('.earnings-widget__amount:eq(2)').text(data); }); - // Reduce font size to avoid design breakage in local currency - $('.earnings-widget__amount').css('font-size','30px'); - + // Reduce font size to avoid design breakage in local currency + $('.earnings-widget__amount').css('font-size', '30px'); // Convert prices in table - if(pathname.indexOf('/earnings/sales') > -1) { - $('.table-general tbody, tfoot').find('tr').each(function(index){ - current_object[index] = $(this); - convertPrice($(this).find('td').eq(2).text().substr(1), function(data){ - current_object[index].find('td').eq(2).text(data); - }); - }); - } else if(pathname.indexOf('/earnings/referrals') > -1) { - $('.table-general tbody, tfoot').find('tr').each(function(index){ - current_object[index] = $(this); - convertPrice($(this).find('td').eq(4).text().substr(1), function(data){ - current_object[index].find('td').eq(4).text(data); - }); - convertPrice($(this).find('td').eq(5).text().substr(1), function(data){ - current_object[index].find('td').eq(5).text(data); - }); - }); - } + if (pathname.indexOf('/earnings/sales') > -1) { + $('.table-general tbody, tfoot').find('tr').each(function(index) { + current_object[index] = $(this); + convertPrice($(this).find('td').eq(2).text().substr(1), function(data) { + current_object[index].find('td').eq(2).text(data); + }); + }); + } else if (pathname.indexOf('/earnings/referrals') > -1) { + $('.table-general tbody, tfoot').find('tr').each(function(index) { + current_object[index] = $(this); + convertPrice($(this).find('td').eq(4).text().substr(1), function(data) { + current_object[index].find('td').eq(4).text(data); + }); + convertPrice($(this).find('td').eq(5).text().substr(1), function(data) { + current_object[index].find('td').eq(5).text(data); + }); + }); + } } } - // SHOW LINKS IN REFERRALS PAGE - if(create_hrefs != 'false') { + if (create_hrefs != 'false') { var pathname = window.location.pathname; if (pathname.indexOf('/referrals') > -1) { var source = ''; var path = ''; var url = ''; - - var ifTableExists = setInterval(function () { + var ifTableExists = setInterval(function() { if ($('#results').length) { clearInterval(ifTableExists); - $('#results').find('tr').each(function () { + $('#results').find('tr').each(function() { if ($(this).find('td').eq(1).text() != '(not set)') { source = $(this).find('td').eq(0).text(); path = $(this).find('td').eq(1).text(); - url = '' + path + ''; - $(this).find('td').eq(1).html(url); } }); @@ -317,22 +284,16 @@ $(document).ready(function() { }, 100); } } - // VERIFY PURCHASE - - if (verify_purchase != 'false') { + if (verify_purchase == 'true') { var pathname = window.location.pathname; if (pathname.indexOf('author_dashboard') > -1) { - var verify_html_block = '

Verify Purchase Code

'; - + var verify_html_block = '

Verify Purchase Code Better Envato

'; //$("#content .content-s").append(verify_html_block); $(verify_html_block).insertBefore("#content .content-s .content-s"); //alert('done'); } } - - - $("#verifypurchase").submit(function(e) { e.preventDefault(); var purchase_code = $("#purchase_code"); @@ -346,9 +307,7 @@ $(document).ready(function() { } var item_purchase_code = purchase_code.val(); $(".loading").fadeIn("slow").html("

Please wait...

"); - - var posturl = 'http://marketplace.envato.com/api/v3/' + username + '/' + apikey + '/verify-purchase:' + item_purchase_code + '.json'; - + var posturl = 'https://marketplace.envato.com/api/v3/' + username + '/' + apikey + '/verify-purchase:' + item_purchase_code + '.json'; $.ajax({ type: 'GET', url: posturl, @@ -357,51 +316,155 @@ $(document).ready(function() { }, dataType: 'json', success: function(data) { - if (data['verify-purchase'].buyer == '' || data['verify-purchase'].buyer == null) { - - $('.loading').fadeIn('slow').html('

Sorry. That was a wrong verification code!

'); - } else if (data.code == 'not_authenticated') { $('.loading').fadeIn('slow').html('

Sorry. Username and/or API Key is invalid.

'); } else { - var buyer = data['verify-purchase'].buyer; var item_name = data['verify-purchase'].item_name; var licence = data['verify-purchase'].licence; var timestamp = data['verify-purchase'].created_at; - $('.loading').fadeIn('slow').html('

' + buyer + ' purchased a ' + licence + ' of ' + item_name + ' ' + $.timeago(timestamp) + '

'); - - } - }, - error: function(data) { $('.loading').fadeIn('slow').html('

Sorry. Something went wrong!

'); } - }); - }); + // Hide Author Earnings + // Author is browsing in public and do not want to reveal his balance + if (hide_earnings == 'true') { + $('.header-logo-account__balance').hide(); + } + /* OLD FORUM LOOK */ + if (old_forum_look == 'true') { + var pathname = window.location.href; + if (pathname.indexOf('forums.envato') > -1) { + // insert styles from manifest :) + // DomChange Function + var observeDOM = (function() { + var MutationObserver = window.MutationObserver || window.WebKitMutationObserver, + eventListenerSupported = window.addEventListener; + return function(obj, callback) { + if (MutationObserver) { + // define a new observer + var obs = new MutationObserver(function(mutations, observer) { + if (mutations[0].addedNodes.length || mutations[0].removedNodes.length) + callback(); + }); + // have the observer observe foo for changes in children + obs.observe(obj, { + childList: true, + subtree: true + }); + } else if (eventListenerSupported) { + obj.addEventListener('DOMNodeInserted', callback, false); + obj.addEventListener('DOMNodeRemoved', callback, false); + } + } + })(); + // Cut URL Part + function cutUrl(str) { + var matched = str.match(/([^/]*\/){4}/); + return matched ? matched[0] : str /* or null if you wish */ ; + } + var poster_avatar, + poster_avatar_big, + last_reply_avatar, + last_reply_avatar_med, + started_by_name, + last_reply_name, + started_by_url, + last_reply_url; + //$('.topic-list thead tr').prepend('Avatar') + function showAvatars(thisObj) { + poster_avatar = $('.posters a:first-child img', thisObj).attr('src'); + poster_avatar_big = poster_avatar.replace("25", "80"); + last_reply_avatar = $('.posters .latest img', thisObj).attr('src'); + last_reply_avatar_mid = last_reply_avatar.replace("25", "40"); + started_by_name = $('.posters a:first-child', thisObj).data('user-card'); + last_reply_name = $('.posters .latest', thisObj).data('user-card'); + started_by_url = cutUrl($('.main-link .title', thisObj).attr('href')); + last_reply_url = $('.activity a', thisObj).attr('href'); + $('.main-link', thisObj).prepend('
'); + if ($(".topic-post-badges", thisObj).length) { + $(".main-link .topic-post-badges", thisObj).after(''); + } else { + $(".main-link .title", thisObj).after(''); + } + $('.thread-quick-links', thisObj).append('
Started by ' + started_by_name + '
Last reply by ' + last_reply_name + '
') + $('.topic-list-item').addClass('old-forum-loaded'); + } -// Hide Author Earnings -// Author is browsing in public and do not want to reveal his balance - -if (hide_earnings == 'true') { - $('.header-logo-account__balance').hide(); -} + function hideCustomTags(thisObj) { + var foundtags = []; + $('.discourse-tag', thisObj).each(function() { + foundtags.push($(this).text()); + }); + for (var i = 0; i < foundtags.length; i++) { + if (forum_blacklist.indexOf(foundtags[i]) > -1) { + thisObj.hide(); + } + } + for (var g = 0; g < foundtags.length; g++) { + if (forum_whitelist.indexOf(foundtags[g]) > -1) { + thisObj.show(); + } + } + } + $('.topic-list-item').each(function() { + showAvatars($(this)); + }); + observeDOM(document.getElementById('main-outlet'), function() { + setTimeout(function() { + $('.topic-list-item').not('.old-forum-loaded').each(function() { + showAvatars($(this)); + }); + }, 1000) + }); + /*if (hide_forum_posts == 'true') { + $('.topic-list-item').each(function() { + hideCustomTags($(this)); + }); + observeDOM(document.getElementById('list-area'), function() { + setTimeout(function() { + $('.topic-list-item').each(function() { + hideCustomTags($(this)); + }); + }, 1000) + }); + }*/ + } /*end pathname fn*/ + } /*end if ole forum*/ + /* + * + * Auto Close Item Preview Frame + * + */ + if (close_iframe_preview == 'true') { + //do this + checkPreviewURL(); + + function checkPreviewURL() { + var pathname = window.location.pathname; + if (pathname.indexOf('/full_screen_preview/') > -1) { + var originalpath = $('body > iframe').attr('src'); + removeiframe(originalpath); + } + } + function removeiframe(originalpath) { + top.location.replace(originalpath); + } + } }); /*End Document Ready*/ - var current_url = window.location.pathname; - $(document).click(function() { - if(window.location.pathname.indexOf('/earnings/') > -1) { + if (window.location.pathname.indexOf('/earnings/') > -1) { if (current_url != window.location.pathname) { location.reload(); } } -}); \ No newline at end of file +}); diff --git a/css/forums.css b/css/forums.css new file mode 100644 index 0000000..eae592c --- /dev/null +++ b/css/forums.css @@ -0,0 +1,169 @@ +/* + * + * ENVATO FORUM CUSTOMIZATION + * BY SURJITH S M (surjithctly) + * + */ + + +/* + * + * GLOBAL PAGE + * + */ + +.d-header { + background-color: #f4f4f4; +} + + +/* + * + * HOME PAGE + * + */ + +.topic-list { + background-color: #fbfbfb; + border: 1px solid #e1e8ed; +} + +.list-controls { + margin-bottom: 10px; +} + +.topic-list:not(.categories) > tbody > tr:nth-child(even) td:first-child { + border-left: 0; +} + +.topic-list:not(.categories) > tbody > tr:nth-child(even) td:last-child { + border-right: 0; +} + +.topic-list td { + padding: 20px 5px; +} + +.topic-list th:first-of-type, +.topic-list td:first-of-type { + padding-left: 20px; +} + +.topic-list:not(.categories) > tbody > tr:nth-child(even) td { + background-color: #fbfbfb; +} + +.old-forum-loaded .discourse-tags, +.thread-quick-links { + margin-left: 110px; +} + +.topic-list .main-link { + box-sizing: border-box; + color: rgb(68, 68, 68); + text-align: left; + text-decoration: none; + border: 0px none rgb(68, 68, 68); + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-size: 24px; + line-height: 28px; + list-style: none outside none; + outline: rgb(68, 68, 68) none 0px; + vertical-align: top; +} + +.topic-list .main-link .title { + font-size: 24px; +} + + +/*#A_1*/ + +.topic-list .topic-excerpt, +.topic-list .views, +.topic-list .posters { + display: none; +} + + +/* .topic-list .category */ + +.topic-list .posts { + width: 80px; +} + +.topic-list .posts-map.badge-posts { + font-size: 24px; + background: #ECECEC; + border-radius: 4px; + display: block; + margin-top: 5px; + padding: 10px 0 25px!important; + position: relative; + width: 80px; +} + +.topic-list .posts-map.badge-posts:after { + content: 'Replies'; + position: absolute; + bottom: 8px; + left: 0; + right: auto; + text-transform: uppercase; + font-size: 11px; + font-weight: normal; + width: 80px; +} + +.thread_thumbs { + float: left; + position: relative; + width: 90px; + height: 90px; + margin-right: 20px; +} + +.thread-last-reply { + position: absolute; + right: 0; + bottom: 0; +} + +.topic-list .badge-notification.new-topic { + font-size: 14px; +} + +.thread-quick-links { + font-size: 12px; + margin-top: 10px; + margin-bottom: 5px; +} + +.thread-quick-links div { + line-height: 1.7; +} + +.show-more.has-topics { + top: 0; +} + +.show-more.has-topics .alert { + padding: 13px 35px 12px 14px; +} + + +/* + * + * TOPIC PAGE + * + */ + +.topic-body { + font-size: 16px; + line-height: 24px; +} + +.topic-post .topic-avatar img { + border-radius: 0; +} + diff --git a/css/options.css b/css/options.css index f4cae03..34686fd 100644 --- a/css/options.css +++ b/css/options.css @@ -1,124 +1,146 @@ /*Options Page*/ body { - background:#eee; - font-family:Arial, Helvetica, Sans-serif; - font-size:14px; - color:#3D3D3D; + background: #eee; + font-family: Arial, Helvetica, Sans-serif; + font-size: 14px; + color: #3D3D3D; + line-height: 1.5; } .settings { - background:#FFF; - margin:50px auto; - padding:30px; - max-width:800px; + background: #FFF; + margin: 50px auto; + padding: 30px; + max-width: 800px; } h1 { - text-align:center; - color:#313131; + text-align: center; + color: #313131; +} + +h2 { + text-align: center; + color: #545454; + background: #F6F6F6; + border-bottom: 1px solid #EBEBEB; + padding: 10px 0; + margin-top: 30px; + margin-bottom: 25px; + font-size: 16px; } p { - color:#707070; + color: #707070; } a { - color:#53A2EC; - text-decoration:none; + color: #53A2EC; + text-decoration: none; } a:hover { - color:#2473BD; + color: #2473BD; } hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eee; + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; } #options-area { - margin-top:50px; + margin-top: 50px; } .text-center { - text-align:center; -} + text-align: center; +} .control-group { - margin-bottom:20px; + margin-bottom: 20px; } .control-label { - float:left; - margin:7px; + float: left; + margin: 7px; } .help-block { - font-size:12px; + font-size: 12px; } .controls { - margin-left:250px; + margin-left: 250px; } -.controls input[type=text], .controls select { - padding:5px 10px; - border:solid 1px #CCC; - width:300px; +.controls input[type=text], +.controls select { + padding: 5px 10px; + border: solid 1px #CCC; + width: 300px; } -select[disabled], input[disabled] { -cursor: not-allowed; -background-color: #eee; -opacity: 1; +select[disabled], +input[disabled] { + cursor: not-allowed; + background-color: #eee; + opacity: 1; } .btn { -display: inline-block; -padding: 6px 12px; -margin-bottom: 0; -font-size: 14px; -font-weight: 400; -line-height: 1.42857143; -text-align: center; -white-space: nowrap; -vertical-align: middle; -cursor: pointer; --webkit-user-select: none; --moz-user-select: none; --ms-user-select: none; -user-select: none; -background-image: none; -border: 1px solid transparent; -border-radius: 4px; -color: #939393; --webkit-transition:all .1s linear; -transition:all .1s linear; -outline:none; + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; + color: #939393; + -webkit-transition: all .1s linear; + transition: all .1s linear; + outline: none; } .btn-success { -background-color: #2cc76a; -background-image: none; -border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); -color:#FFF; + background-color: #2cc76a; + background-image: none; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + color: #FFF; } - - - .highlight { -background: #f5e9a3; -padding: 1em 1.5em; --webkit-transition: background .1s linear; -transition: background .1s linear; + background: #f5e9a3; + padding: 1em 1.5em; + -webkit-transition: background .1s linear; + transition: background .1s linear; } + .highlight.love { -background: #f5a3cc; + background: #f5a3cc; } + +.badge { + font-size: 10px; + font-weight: normal; + color: #FFF; + padding: 2px 6px; + background-color: #F97171; + border-radius: 3px; +} + diff --git a/manifest.json b/manifest.json index c078774..2a7f058 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,17 @@ "content_scripts": [ { "js": [ "js/jquery.min.js", "js/plugins.js", "js/Chart.min.js", "better-envato.js" ], "css": ["css/envato-styles.css"], - "matches": [ "*://*.themeforest.net/*", "*://*.codecanyon.net/*", "*://*.videohive.net/*", "*://*.audiojungle.net/*", "*://*.graphicriver.net/*", "*://*.photodune.net/*", "*://*.3docean.net/*", "*://*.activeden.net/*", "*://*.envato.com/*" ] - } ], + "matches": [ "*://*.themeforest.net/*", "*://*.codecanyon.net/*", "*://*.videohive.net/*", "*://*.audiojungle.net/*", "*://*.graphicriver.net/*", "*://*.photodune.net/*", "*://*.3docean.net/*", "*://*.activeden.net/*", "*://forums.envato.com/*" ] + + }, +{ + "css": ["css/forums.css"], +"matches": ["*://forums.envato.com/*" ], +"run_at": "document_start" +} + + ], +"web_accessible_resources": ["css/forums.css"], "browser_action": { "name": "Better Envato" }, @@ -20,7 +29,7 @@ "name": "Better Envato", "short_name": "Better Envato", "options_page": "options.html", - "permissions": [ "webRequest", "notifications", "background" ], + "permissions": [ "tabs", "webRequest", "notifications", "background" ], "update_url": "http://clients2.google.com/service/update2/crx", - "version": "1.2.5" + "version": "1.2.6" } diff --git a/options.html b/options.html index 0743d83..674d628 100644 --- a/options.html +++ b/options.html @@ -1,340 +1,394 @@ + -Better Envato Options - + Better Envato Options + + +
+

Better Envato

+

Make Envato Better by adding some cool features. +
Made with ♥ by Surjith S M

-
-

Better Envato Options

- - -
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
- -
-
- -
-
- -
-
- -
-

Please Fill below details to localize earnings

-
-
-
- -
- -

Signup free to get API Key from Open Exchange rate

-
-
-
- -
- -
-
-
-
- -
-
- -
-
-
-
-
- -
-
- -
-
-
-
-
- -
-
- +
+ +
+
+
+ +

Extension Settings

+ +
+ +
+ +
+
+
+ +
+ +
+
+ +

Desktop Notifications

+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +

Localize Earnings

+
+ +
+
+ +
+
+ +
+
+ +
+

Please Fill below details to localize earnings

+
+
+
+ +
+ +

Signup free to get API Key from Open Exchange rate

+
+
+
+ +
+ +
+
+ +

Forums NEW

+ +
+ +
+
+ + ( See Preview )
+ +
+
+ + + +

Item Pages NEW

+ +
+ +
+
+ +
+
+
+ +

Other Features

+ +
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
-
-
-
-
- -
-
- +
+
-
-
-
-
- +

Made with ♥ by Surjith S M (Envato Portfolio). +
Fork on Github | Found an issue? | Credits : Envato API | Contributors: Zan Gerden

-
-
-

Made with ♥ by Surjith S M (Envato Portfolio).
- Fork on Github | Found an issue? | Credits : Envato API | Contributors: Zan Gerden

-
- - - + + + - \ No newline at end of file + +