Author

Topic: New Chrome extension to track the current activity period (Read 353 times)

legendary
Activity: 1750
Merit: 1115
Providing AI/ChatGpt Services - PM!
r the free javascript lesson. For one who doesn't even know how to save a Chrome Extension and check it you surely know an awful lot.
What does knowing JavaScript has anything to with downloading chrome extension ? As long as your logic is concerned,I'm pretty sure you're a good programmer. Undecided
I don't know how did you take the criticism but I didn't intend to offend your feelings because you have globals and no strict modes which is not my business anymore.
jr. member
Activity: 36
Merit: 3
Looks fine.I don't know how much do I trust the chrome extension code viewer.I don't know what javaScript world OP lives in the code certainly looks outdated  Tongue
No offence to OP but gone are the days we used to use 'var' for declaring variables.
Thanks for the free javascript lesson. For one who doesn't even know how to save a Chrome Extension and check it you surely know an awful lot.

So if you want, you can check everything by yourself with this "Chrome extension source viewer" extension.
And who is going to check that extension? Smiley The right way is:
  • download the extension, it has .crx extension;
  • rename it to .zip;
  • check the code.
legendary
Activity: 1750
Merit: 1115
Providing AI/ChatGpt Services - PM!
Can we somehow have a look at the source code of the extension ? Without a doubt installing any chrome plugins can put your browsing activities to risk from data breach to wallet hacks.Making the source code open to public may be a nice way to show that it's all legit.
As long as it's proven to be fully secure, I'm not going to download it.

Watching thread...
How will I know if this is not going to rob my bitcointalk account?
I checked the extension source code and looks like there is nothing wrong with it.
But you shouldn't trust me aswell. So if you want, you can check everything by yourself with this "Chrome extension source viewer" extension[1].

The way it works is very simple. Here is the source code:
Code:
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dec'];
var base = 1510080000;
var delta = 1210000;
var span;

function formatDate(d) {
    return d.getDate() + " " + months[d.getMonth()] + ' ' + d.getFullYear();
}

function diff(d) {
    d = Math.floor(d);
    if (d > 172800) {
        return Math.floor(d / 86400) + ' days'
    } else if (d > 7200) {
        return Math.floor(d / 3600) + ' hours'
    } else if (d > 120) {
        return Math.floor(d / 60) + ' minutes'
    } else {
        return d + ' seconds'
    }
}

function setup() {
    var coll = document.getElementsByTagName('table')[1].rows[0].cells;
    var dObj = coll[coll.length - 1].children[0];
    dObj.innerHTML += ' ';
    span = document.getElementById('sp_btt_ext');
}

function main() {
    var elapsed = new Date() / 1000;
    var previous = Math.floor((elapsed - base) / delta) * delta + base;
    var next = previous + delta;
    var perc = (elapsed - previous) / delta;
    var dPrev = new Date(previous * 1000);
    var dNext = new Date(next * 1000);
    span.title = 'Current period started ' + formatDate(dPrev) + ' (' + diff(elapsed - previous) + ' ago)\nNext period starts ' + formatDate(dNext) + ' (in ' + diff(next - elapsed) + ')';
    span.innerHTML = (perc * 100)
        .toFixed(2) + '%';
}
setup();
main();
window.setInterval(main, 1000);

[1] https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
Looks fine.I don't know how much do I trust the chrome extension code viewer.I don't know what javaScript world OP lives in the code certainly looks outdated  Tongue
No offence to OP but gone are the days we used to use 'var' for declaring variables.Anyway that's off-topic,don't understand the constants declared globally.I don't know what to make of it but if the code is generated from the right sources,there isn;'t any harm in using it.
jr. member
Activity: 36
Merit: 3
I don't get the correlation between your account getting  hacked and you creating a chrome extension for counting activities ? Eitherway,this will be utilised by account farmers only.
I had to make another account and my activity was zero again, as I said in my post. It seems obvious that I wish to try to reach my previous level of activity.

Can we somehow have a look at the source code of the extension? Without a doubt installing any chrome plugins can put your browsing activities to risk from data breach to wallet hacks.Making the source code open to public may be a nice way to show that it's all legit.
All Chrome extensions are always public.
legendary
Activity: 2758
Merit: 6830
Can we somehow have a look at the source code of the extension ? Without a doubt installing any chrome plugins can put your browsing activities to risk from data breach to wallet hacks.Making the source code open to public may be a nice way to show that it's all legit.
As long as it's proven to be fully secure, I'm not going to download it.

Watching thread...
How will I know if this is not going to rob my bitcointalk account?
I checked the extension source code and looks like there is nothing wrong with it.
But you shouldn't trust me aswell. So if you want, you can check everything by yourself with this "Chrome extension source viewer" extension[1].

The way it works is very simple. Here is the source code:
Code:
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dec'];
var base = 1510080000;
var delta = 1210000;
var span;

function formatDate(d) {
    return d.getDate() + " " + months[d.getMonth()] + ' ' + d.getFullYear();
}

function diff(d) {
    d = Math.floor(d);
    if (d > 172800) {
        return Math.floor(d / 86400) + ' days'
    } else if (d > 7200) {
        return Math.floor(d / 3600) + ' hours'
    } else if (d > 120) {
        return Math.floor(d / 60) + ' minutes'
    } else {
        return d + ' seconds'
    }
}

function setup() {
    var coll = document.getElementsByTagName('table')[1].rows[0].cells;
    var dObj = coll[coll.length - 1].children[0];
    dObj.innerHTML += ' ';
    span = document.getElementById('sp_btt_ext');
}

function main() {
    var elapsed = new Date() / 1000;
    var previous = Math.floor((elapsed - base) / delta) * delta + base;
    var next = previous + delta;
    var perc = (elapsed - previous) / delta;
    var dPrev = new Date(previous * 1000);
    var dNext = new Date(next * 1000);
    span.title = 'Current period started ' + formatDate(dPrev) + ' (' + diff(elapsed - previous) + ' ago)\nNext period starts ' + formatDate(dNext) + ' (in ' + diff(next - elapsed) + ')';
    span.innerHTML = (perc * 100)
        .toFixed(2) + '%';
}
setup();
main();
window.setInterval(main, 1000);

[1] https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
legendary
Activity: 1750
Merit: 1115
Providing AI/ChatGpt Services - PM!
So yesterday I got my old "RedGolpe" account hacked, no big deal as I had no significant relationships with the nice guys on this forum, just locked it (apparently the hacker didn't even have time to use it) and created a new one. Of course, as a newbie, my post count was zero again so I checked how to improve it and came across all the "activity" thing.
I don't get the correlation between your account getting  hacked and you creating a chrome extension for counting activities ? Eitherway,this will be utilised by account farmers only.

Long story short, I made a small Chrome extension that allows a user to track the current activity period for my personal use, but based on comments here I thought someone else might be interested, so I just made it public.

Let me know if you find it useful Smiley
Can we somehow have a look at the source code of the extension ? Without a doubt installing any chrome plugins can put your browsing activities to risk from data breach to wallet hacks.Making the source code open to public may be a nice way to show that it's all legit.
newbie
Activity: 5
Merit: 0
How will I know if this is not going to rob my bitcointalk account?
full member
Activity: 168
Merit: 120
This sure will benefit those users with multiple accounts can be used as for the purpose of their post farming activities. Imagine this could help them monitor their tracking activity so that they will know the updates on how they can post to their next account without even hassling to log in and log out. But nevertheless it is one hell of a development.
member
Activity: 76
Merit: 14
SYNAPSECOIN.NET
wow .... increasing also its development
jr. member
Activity: 36
Merit: 3
I imagine the majority of the people using this will be account farmers.
I feared the same, but with the 14-post biweekly limit I don't think that's the case anymore. You just need one post per day to reach the limit, so any farmer of sane mind would likely use more efficient ways than this petty extension.
sr. member
Activity: 280
Merit: 250
I imagine the majority of the people using this will be account farmers. but it might serve useful to some people who care about their activity.
jr. member
Activity: 36
Merit: 3
So yesterday I got my old "RedGolpe" account hacked, no big deal as I had no significant relationships with the nice guys on this forum, just locked it (apparently the hacker didn't even have time to use it) and created a new one. Of course, as a newbie, my post count was zero again so I checked how to improve it and came across all the "activity" thing.

Long story short, I made a small Chrome extension that allows a user to track the current activity period for my personal use, but based on comments here I thought someone else might be interested, so I just made it public.

Let me know if you find it useful Smiley
Jump to: