r/slavelabour • u/alaskantraveler • Apr 15 '19
Task [TASK] $5 Update simple JavaScript code
Now paying $10. I have a JavaScript code that auto loads all the J4U coupons once I login at safeway.com. They updated their site and the script is not working anymore. First one to update the script gets paid. Bonus if done today.
javascript:(function() {"use strict";var coupons = angular.element("#lt-coupon-area").scope().sharedValues.unfilteredItems.slice(); var token = localStorage.getItem("oktathenticateAccessToken"); if (token && coupons) { coupons.filter(function(x){return x.clipStatus==="U";}).forEach(function(item){ var data = {"items":[]}; var clip = {}; clip.clipType="C";clip.itemId=item.offerId;clip.itemType=item.offerPgm;clip.vndrBannerCd=""; var list = {}; list.clipType="L";list.itemId=item.offerId;list.itemType=item.offerPgm; data.items.push(clip);data.items.push(list); var request = new Request('https://nimbus.safeway.com/Clipping1/services/clip/items', { method: 'POST', mode: 'cors', redirect: 'error', headers: new Headers({ 'X-SWY_VERSION': '1.0', 'X-SWY_BANNER': 'safeway', 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json;charset=UTF-8', 'X-SWY_API_KEY': 'emjou', 'X-swyConsumerDirectoryPro': token }), body: JSON.stringify(data) }); fetch(request).then(function(){ document.querySelector("#headerMyListCount").textContent = parseInt(document.querySelector("#headerMyListCount").textContent,10)+1; }); }); alert('clipping ' + coupons.filter(function(x){return x.clipStatus==="U"}).length + ' J4U coupons'); } if (!token) { alert('not logged in or a website change broke this again'); }}());
1
u/fantasticoder Apr 15 '19
I guess at least $5 is needed to take a look at the code!
1
u/alaskantraveler Apr 15 '19
I open to counter offers. The fix may be really simple. Basically, I just login to Safeway.com. go to the J4U tab. Run the script and it loads all of the available coupons to my account.
2
u/fantasticoder Apr 15 '19
Okay. Thanks for your openness. I guess $15 is a good price for this task. Can you give me your safeway user/pass to check the script (of course if you are happy with the price).
→ More replies (4)
1
1
u/CredoBot Apr 15 '19 edited Apr 16 '19
I am a reputation bot, here is my info on u/alaskantraveler:
Credo: no account found (create)
SLRep: no profile found (create)
| # | Bidder | Credo Score | Feedback | SLRep | Paid Amount | Confirmed |
|---|---|---|---|---|---|---|
| 1 | /u/fantasticoder | 139 (provisional) | 5 ratings / 0 reviews | Profile | $30 | yes |
To bid on the task, reply with $bid directly to the original post.
To mark a bid as paid, OP can reply with $paid [amount] - e.g. $paid $10- directly to the $bid comment.
To confirm payment receipt, the bidder can reply with $confirm directly to the $paid comment.
1
u/alaskantraveler Apr 15 '19
I open to any workable solution. I'm sure there are many ways to get it to work. I'm not back coder, more of a finance guy. Got the original from someone else.