So, i have ONE addon, but TWO version of it. 1. old version, with few different functions, which the NEW version doesnt have.
Because i dont understand javascript, i did only one change successfully, so one feature from old version is now in new version.
But after a month of trying, i just cant make other features working.
Can someone help me with it? For someone who know what he do, it will be just about few looks on code. For me it is like chinese font
That addon is simple, nothing hard i bet, nothing illegal.
Bruh, just get your mouse and select the whole-code section/block you want to share to be inspected/checked here and copy it here with a code goes here <-in this format which is select the code/text and click the </> button here on (is number 6) top of the text-box to reply/post.
My first thought about āhow to do itā was like "ok i dont need to see āmedal rewardsā so i can use ābodyā from it, to implement just the āsnipeā code from older version. But my attemps wasnt successfully.
Also, in new version, there is switch in names, but code looks same, as in old version, but in new version is āSaveRankCostā , in old version is name āSnipeRankCostā
Bruh, do you have any sort of documentation we can look in regards to these add-ons for chrome, so we can look at ? I mean what is it that you trying to do, whatās wrong with it?
I can upload both full version of addon, if it helps?
it is āfoe helperā addon
In the folder are many files, like:
_locales
content
css
images
jss (inside is: web(inside is: _api, _helper, _i18n,_languages, _main, _menu, calculator) , background.js, inject.js, popup.js,text-pop.js)
vendor
manifes.json
calculator folder is the one, which should be modificate, but it must be connected with other folders i think, and that is another problem, because i dont have idea which
here is link for oficial version (latest one).
Same addon was half year before with āsnipeā function in calculator, but it was removed. I want it just back.
What does snipe function? In game there are building, you can put inside forgepoints to contribute reward. Snipe function calculate the minimum safety contribution of forge points.
or simplier in this link are both version of addon.
What i need is, if someone can put ācalculatorā from old version (2.4.) and put it in the new version (2.5.) and make it function in new version.
Just change calculator (js->web->calculator) in new version, to the calculator in old version. (copy paste folder calculator, and change code in other connected folders to accept old version in new version code)
also if you can do this, maybe you will know, how to add also āread buildingsā feature (js->web->read buildings) (it is in old version, but missing in new version)
you can download it by click on āturttle iconā
2.4. is old version
2.5. is latest version
Edit: i cant post more than 7 posts a days, so i must edit.
Well on github is only the latest version(2.5) of addon, so also calculator. But i would like to have old calculator (2.4) in the latest version (2.5)
I already tried it, copy paste folders. But as i wrote, it doesnt work. I think, that there must be change also something in folders like āapi, mainā. But because i dont have idea , how this āchinese fontā function, i cant see āwell this part of code refer to folder ā_mainā in 447 line, so i need to edit also hereā.
That is why i asking on this forum, you guys didnt saw this kind of āchinese fontā for first time like me You can see all connection bettween lines, i simply cant.
When i wanted to change(copy paste) code for calculation āmedals rewardā to āsnipeā code. Because i wanted to use already set ābodyā for āmedal rewardā (because i dont have idea how to create own body for āsnipeā or i even cant distinguish code from old version 2.4 āsnipe bodyā , to just substitute code for it in new version.
What i find is, that in old version, it is called āsnipe⦠SnipeRankCost etcā¦ā
in new vrsion it is in code called āSaveā¦SaveRankCost etc. ā¦ā
The think is, that in old version everything (medal, forge points, blueprints) are in code
So what exactly is different between āMath.roundā vs āMainParser.roundā?
I can try substitute every āMainParser.roundā in new code, to āMath.roundā from old code. Does it help? Or i will mix two different things?
Hi, i have a little bit problem with editting existing extension for google chrome. It is extension for web browser game, nothing illegal. Just there exist two version of extension. 1. old ver. 2.4 and second the latest.
My problem is, that in latest, author of extension changed style of ācalculatorā, so i want to change it to the old one, from version 2.4.
I have both version dowloaded (NovÔ složka.rar | Ulož.to (for download click on the turtlle icon))
So, i had an idea, that i will just copy and paste code from old calculator to the new calculator. jss. But it doesnt work ofc, because i dont have idea what to change in code, what is reffering to new code to accept old one calculator.
What i find is, that in old version, it is called āsnipe⦠SnipeRankCost etcā¦ā
in new vrsion it is in code called āSaveā¦SaveRankCost etc. ā¦ā
The think is, that in old version everything (medal, forge points, blueprints) are in code
So what exactly is different between āMath.roundā vs āMainParser.roundā?
I can try substitute every āMainParser.roundā in new code, to āMath.roundā from old code. Does it help? Or i will mix two different things?
Because for me is all this coding like trying to read chinese font, so that is why i asking help here. You already see this type of problems and you know what to do with it, also when i will take a look on code, i simply cant see that āthis link is connected to another one in different folderā
I donāt know what āMainParserā is, I assume it is a specific module to this project. Without seeing its code, we canāt tell what ll it does. Presumably it āroundsā, but there may be something else going on. The other problem is that the results here are being assigned to different variables, the first one to SnipeRankCosts[Rank] and the second to SaveRankCosts[Rank] - are you sure these are the same sections of code?
Yeah, you have to be careful about swapping things out like this. It would a lot depend on how close the code is. Swapping parts in a 2006 Prius and a 2007 Prius might work, but if itās a 2007 Prius and a 1967 Mustang, it gets a lot more difficult.
Well, in another thread (i tought that extension is javascript) i copy and paste whole code for ācalculatorā in both version, you can take a look(I need help with edit addon (chrome) - #3 by abcklm), or just download both version which i included in first post.
So yeh, for me, code looks same, but with different names and this "math. round and mainparser
So what exactly is different between āMath.roundā vs āMainParser.roundā?
Looking in _main.js, that is where MainParser is defined. That specific method is defined as:
/**
* Performs rounding taking into account floating point inaccuracy
*
* @param {number} value
* @returns {number}
*/
round: (value) => {
let Epsilon = 0.000001;
if (value >= 0) {
return Math.round(value + Epsilon);
}
else {
return Math.round(value - Epsilon);
}
},
So heās building in some fudge factoring into his round functions. Heās defined a custom epsilon - Iām not sure why he didnāt use the system epsilon. If you donāt understand what I am talking about, google ā0.1 + 0.2 javascriptā.
So, itās just an ever so slightly adjusted rounding method. My guess is that 99% of the time it will have no effect and when it does, only slightly. I would not expect it to have catastrophic results, but maybe there are other parts of the code that are dependent on that.
It looks to me like there are some non-trivial changes between these two versions. Without knowing a lot more about the code, I would not want to go swapping out things.
One thing to try, if you want to see if the new rounding is affecting things, would be to just go into _main.js and change that method to:
round: (value) => Math.round(value),
Itās also possible that:
round: Math.round,
would work.
These would revert to the āoldā rounding anywhere this method is used.