Skip to content

Commit

Permalink
No short information in profile bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil9l committed May 14, 2016
1 parent fd8ba2b commit 694bd15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions js/vkinject.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
var MAX_LEGEND_STRING_LENGTH = 25;
var MAX_LEGEND_ITEMS_NUMBER = 18;
var UPDATE_TIMEOUT = 100;
var OLD_SELECTOR = '#profile_short .profile_info';
var NEW_SELECTOR = '#profile_short';

/**
* Pads string with zeroes upto given length.
Expand Down Expand Up @@ -240,10 +238,9 @@ function renderCharts(version) {
}

function injectToPage(version) {
var injectBlockSelector = version === 'old' ? OLD_SELECTOR : NEW_SELECTOR;

console.log($('.vk-statistics-was-used').length);
if ($('#profile_short').length !== 0 && $('.vk-statistics-was-used').length === 0 && $('.friend-statistic-container').length === 0) {
$(injectBlockSelector).append('<div class="clear_fix vk-statistics-was-used"></div>');
$('#profile_short').append('<div class="clear_fix vk-statistics-was-used"></div>');
setTimeout(function () {
renderCharts(version);
}, UPDATE_TIMEOUT);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "VK Charts",
"description": "Allows to see statistics based on user vk profile.",
"version": "1.0.3",
"version": "1.0.4",
"permissions": [
"tabs",
"storage",
Expand Down

0 comments on commit 694bd15

Please sign in to comment.