Coder Social home page Coder Social logo

mardaneus86 / futwebapp-tampermonkey Goto Github PK

View Code? Open in Web Editor NEW
192.0 46.0 103.0 2.03 MB

TamperMonkey scripts to enhance the FUT 21 Web App - Discontinued

License: MIT License

JavaScript 83.81% HTML 8.93% SCSS 7.26%
tampermonkey-userscript fifa-ultimate-team fut-web fifa21 fut21

futwebapp-tampermonkey's Introduction

FUT Web App - TamperMonkey scripts

Join the chat at https://gitter.im/futwebapp-tampermonkey/Lobby

⚠️ Discontinued

Due to personal time constraints I can no longer keep this script working at all times, as you have all noted over the past few months. So I've taken the decision to stop working on this project and create some clarity for the community.

The code will remain available in the Github repository and on OpenUserJS. Maybe someone is willing to continue the project in a fork. If there is a fork with enough trustworthiness, I'm happy to route everyone there. Send me a message in case you want me to link to your fork.

This project has been a great journey for me, and I'm very thankful for all the support of the community over the years.

FIFA 21's companion app for FIFA Ultimate Team, the FUT 21 Web App, is a website that let's you trade and manage your team on the go.

This TamperMonkey script is meant to enhance the FUT 21 Web App experience. You can install the script following the instructions below. Afterwards you will get a settings button on the bottom right of the web app, where you can enable every feature by itself. The script provides a certain degree of customization possibilities.

⚠️ Using this script is at your own risk. EA might (temp-)ban you for altering parts of their Web App.

‼️ Do not request autobuyer features. Because they are considered to be cheating, it will not be added.

I started this project to learn about reverse engineering big Javascript codebases.

If you benefit from this project, you can buy me a beer 🍻 👍

paypal

Features

  • Futbin integration
    • Show Futbin prices on all player cards throughout the app
    • Show link to player on Futbin
    • Mark bargains (BIN price lower then Futbin value)
  • Find minimum BIN value of players
  • Refresh transfer list
  • Increase transfer list size
  • Extra card information (contracts)
  • Total coin value for cards on the transfer list

Installation

Make sure you have user scripts enabled in your browser (these instructions refer to the latest versions of the browser):

Install scripts

Install the scripts via OpenUserJS. Or find the latest version and release notes at the releases page.

Feature requests

If you feel there are missing features, feel free to add a request to the issue list. Make sure to provide the necessary details, or even a mockup of what the feature would look like.

Issues

File a bug report in the issue list.

Developing

Clone this repository and execute:

npm install

To start the bundling process and linting process, execute:

npm start

Make sure to enable Allow access to file URLs in chrome://extensions/ for Tampermonkey, and add the following script snippet:

// ==UserScript==
// @name        FUT Enhancer dev
// @version     0.1
// @description
// @license     MIT
// @author      Tim Klingeleers
// @match       https://www.easports.com/fifa/ultimate-team/web-app/*
// @match       https://www.easports.com/*/fifa/ultimate-team/web-app/*
// @match       https://www.ea.com/fifa/ultimate-team/web-app/*
// @match       https://www.ea.com/*/fifa/ultimate-team/web-app/*
// @namespace   https://github.com/Mardaneus86
// @supportURL  https://github.com/Mardaneus86/futwebapp-tampermonkey/issues
// @grant       GM_notification
// @grant       GM_xmlhttpRequest
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       window.focus
// @require     file:///<path to repo>/dist/fut-enhancer.user.js
// @connect     ea.com
// @connect     futbin.com
// ==/UserScript==

Remember to change the path after @require to the folder where you cloned the repository. It should point to the generated fut-enhancer.user.js in the dist folder.

Contribute

Add a feature request or bug to the issue list before doing a PR in order to discuss it before implementing a fix. Issues that are marked with the help wanted have priority if you want to help.

futwebapp-tampermonkey's People

Contributors

ajpiano avatar eimarfandino avatar furkick avatar gitter-badger avatar hejamartin avatar jhuriez avatar kyderman avatar mardaneus86 avatar omursahin avatar regaddi avatar renard0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

futwebapp-tampermonkey's Issues

Suggestion - FUT Show Futbin Player Price, change coin colour

At the moment the columns of coins and prices melt into one another and at first glance it's difficult to differentiate them when looking at a full screen of cards (especially when it takes a second or two to pop in).

Is it possible to do this?

https://i.imgur.com/NsIYiDJ.png

Here's the green coin if it's possible, I'm also sure it'll look better than my quick mock up as you'll be able to do it via css.
https://i.imgur.com/eYmRCZ4.png

FUT Confirm Buy Now Dialog doesn't do anything

Expected behavior:

The script should auto-confirm the confirmation popup when I click "Buy Now" in the FUT Web app

Current behavior:

Clicking "Buy Now" opens the popup and does not confirm it.

I installed TamperMonkey extension and added the script to it. TamperMonkey says the script is "On".

Metadata:

  • Script name: FUT Confirm Buy Now Dialog
  • Script version: v0.1.2
  • Browser: Chrome
  • OS: Windows 10

Suggestion: Script to count how many times a card has been transfer listed

Suggestion -

With 100 positions for possible transfer listed cards, some don't sell but it takes forever to look through them all it's impossible to know how many times you've listed the card.

It'd be awesome if each time a card from your transfer list was listed it displayed number similar to the contracts/fitness display.

This way you could manually quick sell the cards that are failing to sell and taking up valuable space on the transfer list.

You could even have it auto quicksell after 10 listings etc

[Request] Ability to search by lowest bin for player in a changed position or applied chemistry

Expected behavior:

I would like to have the script to be able to search by lowest BIN price for a player in a changed position or specific chemistry.

Current behavior:

Currently the script only searches for the player and its lowest BIN price. I tried to modify the script and hardcode position on this line:

searchdata.searchCriteria.position = enums.SearchCategory.ANY; => searchdata.searchCriteria.position = "CAM";, but it didn't work.

Cache or RateLimit Futbin requests

If I scroll through a few pages of players in my club the futbin prices stop showing up.
I'm not seeing the requests in the network inspector but I believe futbin may be rate limiting it.
Maybe the script show also do a rate limit and/or have a local cache of prices (e.g. for 1h)

Add to SBC Button

Would be cool if similar to the "Add to Squad" button there was an "add to sbc" button.
User would get a picker to choose the sbc set (maybe it can reuse the existing view from webapp) and then it can show the squad on the side panel just like it does for your active squad.

[Suggestion] Relist item with specific hours

It would be great if there was a dropdown selector to select for how long to re-list all the items in the trade pile.

p.s. When I will have more time, I will learn JS (I'm a developer, just not a JS developer) and maybe will be able to contribute.

Decrease load on Futbin

While showing player prices, the Futbin service gets called for every single player that is on the page. We can decrease the amount of requests by calling https://www.futbin.com/18/playerPrices?player=&all_versions=##,##, where ## is the player id. This list can be comma separated, where you get a single response that includes prices for every player id.

Help me with bag

Tell me how to change the script so that I get the price twice (or better in one) when I click the button, and not three, as now. That is, the problem is this: I click on the button and the price is received, then after a time there are two more price updates. How to fix it? I'm strong in php, java, but not strong at js.

For myself, I rewrote a bit of code for my style and added a few useful features that I need.

(function () {
  'use strict';

	$(document).bind('DOMNodeInserted', function(event) {
		
		var playerImageUrl;
		var playerId;
		
		if($(event.target).hasClass('DetailPanel')) {
			
			if($(event.target).find('#getMinBuyNowPrice').length === 0) {
				
				$(event.target).find('.bidOptions').append('<button id="getMinBuyNowPrice" class="list"><span class="btn-text">Buy Now (min.)</span><span class="btn-subtext coins" id="minBuyNow">Get Price</span></button>');
				$(event.target).find('.QuickListPanel').append('<button id="getMinBuyNowPrice" class="list"><span class="btn-text">Buy Now (min.)</span><span class="btn-subtext coins" id="minBuyNow">Get Price</span></button>');
				
			}
			
			$('.listFUTItem').click(function () {
				
				$('#minBuyNow').text('Get Price');
				
			});
			
			$('#getMinBuyNowPrice').click(function () {
				
				if($('body').find('.squadSlot').length === 0) {
				
					playerImageUrl = $('.listFUTItem.selected').find('.photo').attr('src');
					
				} else {
					
					playerImageUrl = $('.squadSlot.ui-slot-selected').find('.photo').attr('src');
				
				}
				
				playerId = playerImageUrl.substr(playerImageUrl.lastIndexOf('/') + 1).replace('.png', '');
				search(playerId, 9999999999).observe(this, handleSearch);
					
			});
			
		}
		
	});
	
	var minimumBIN = 9999999999;
	var maskedDefId = 0;
	var handleSearch = function handleSearch(t, data) {
	var lowestBIN;
	var player;
	
		if(data.items.length > 0) {
			
			var newMinimumBIN = Math.min.apply(Math, data.items.map(function (o) { return o._auction.buyNowPrice; }));
			
			if(newMinimumBIN < minimumBIN) {
				
				minimumBIN = newMinimumBIN;
				$('#minBuyNow').text(minimumBIN);
			
				var random_time = Math.random()*(17000 - 8000 + 1) + 8000;
				setTimeout(function () { search(maskedDefId, minimumBIN).observe(this, handleSearch); }, random_time);
			
			} else {
			
				lowestBIN = Math.min.apply(Math, data.items.map(function (o) { return o._auction.buyNowPrice; }));
				player = repositories.Item.getStaticDataByDefId(maskedDefId);
			
				$('#minBuyNow').text(lowestBIN);
		  
		  }
		
		} else {
			
			lowestBIN = Math.min.apply(Math, data.items.map(function (o) { return o._auction.buyNowPrice; }));
			player = repositories.Item.getStaticDataByDefId(maskedDefId);
			$('#minBuyNow').text(lowestBIN);
		}
	
	};

	var search = function search(playerId, maxBuy) {
	
		minimumBIN = maxBuy;
		maskedDefId = playerId;
		
		if(maxBuy === 9999999999) {
			
			maxBuy = 0;
		
		}

		var searchCriteria = new transferobjects.SearchCriteria();
		searchCriteria.type = enums.SearchType.PLAYER;
		searchCriteria.defId = [maskedDefId];
		searchCriteria.maxBuy = maxBuy;

		return repositories.TransferMarket.search(searchCriteria);
	
	};

})();

buy players automatically

What would be really awesome for me is if there is a way to automatically buy players. So, I would set some criteria in this script (for example: rare gold players from bundesliga < 1000) and then buy 30 players that fit the criteria.

Auto-buyer removed?

Hi there,

Why was auto buyer removed? Are we expecting a new version?
Using the old one, with the improvement suggested in the PR, I got some nice hits yesterday, but none since (a few hours running, with smaller delay - 3-5 seconds each).

Is it broken?

Thanks for all your efforts.
Is there any place we can chat?

RPM attempt

So I did this with the RPM stuff. I ran it overnight (about 9 hours) and it was still going in the morning (actually I had a transfer pile of about 90 items - could add a limit)

  var startSearch = function startSearch(searchCriteria, controller) {
      // TODO: need a better way to do RPM limiting
      var delay = 0;
      var runningTime = new Date().getTime() - GM_getValue('searchStartDate');
      if (runningTime > 1 * 10 * 60 * 1000) { // after 10 mins of searching wait for a bit
        GM_setValue('searchStartDate', null);
        delay = (Math.floor(Math.random() * 6) + 1) * (Math.floor(Math.random() * 19) + 40) * 1000; // wait between 1.75 and 7.75 mins
        addMessage('Running for 10 mins, waiting '+(delay / 1000 / 60)+' mins to be safe');
        GM_setValue('searchStartDate', new Date().getTime());
      } else {
        // randomly wait between 2 and 12 seconds
        delay = (Math.floor(Math.random() * 100) + 20) * 100;
      }

I also changed the message printed, which I found more useful:
addMessage('No results, waited '+(delay / 1000)+' last time');

It will will actually run for 10 mins - the last delay after the first run, so that gap is also pretty randomised.

I don't know java, only powershell and bits of python so I've really just played with exisitng logic.

I also have no idea about how likely it is to cause a ban etc.

[request] disable visibilitychange handlers

Expected behavior:

If you hide the webapp browser tab completely by switching to another tab, the webapp goes into this mode where some elements aren't visible or displayed, thus using selectors to select elements won't work. The webapp code seems to be setting the visibilitychange event handler on the document whenever you enter some views? Not sure how to disable it completely.

Current behavior:

Give a detailed explanation of the current behavior.

Metadata:

  • Script name:
  • Script version:
  • Browser:
  • OS:

Automatically clear expired items in transfer targets

Expected behavior:

Is there a script that automatically clear expired items in transfer targets, similar to how there is one to automatically clear items that are sold?

Current behavior:

Give a detailed explanation of the current behavior.

Metadata:

  • Script name:
  • Script version:
  • Browser:
  • OS:

Club Search BIN Prices

I'm not seemingly able to get prices when I search the club, e.g searching bronze players, I get no prices

Additonally, the informs in my club are not giving the correct price, those on the trade pile do.

See club / transfer list worth based on minimum BIN

Just an idea of an enhancement of some kind, would work well in conjunction with the minimized API call to futbin.

I've been working a little bit on this but not had real time to put forward yet.

Basically, it would be very handy to see the total futbin price of the club or transfer pile so we have a better understanding of what the club is worth, but also how the market is faring (possibly use localStorage to store previous values with times / dates so comparison can be made).

Additionally, being able to sort by highest futbin price would be a great addition.

[Suggestion] Trade Pile Value

Trade Pile Value

These scripts are excellent, particularly for a programming newbie like myself. A suggestion I have is if one can develop a script to determine the value of the Trade Pile at any given time.

Change Futbin console/pc price source

It would be nice if we could use settings to select the source, either xbox/ps4 or pc as the futbin price option.

In the "Show Futbin player price" script.

edit: Oh.. I just checked the source and it looks like it does this already by picking what platform you're on. I guess it's just Futbin being slow to update the PC bin prices

feel free to close.

Some requests

Hi,

Nice scripts and nice work !

Somes features requests :

  • Show "Contract" and "Fitness" in SearchResult list
  • I thinks it's not possible but : Be able to filter by minimum contract number
  • Auto "BuyNow" in one click, or one shortcut ?

I have tried to create a script tampermonkey for auto focus the input text "price-filter" in Search page, but it's doesn't work.. You know if it's possible ?

Are pinEvents triggered when using "FUT Auto Relist Expired Auctions"

Expected behavior:

pinEvents are triggered when you switch between screens and perform certain actions. If I use this script, does it trigger the necessary pinEvents so that the server knows that we aren't relisting automatically?

I was reading this futapi/fut#287 (a separate Python API using the same Web app backend) which says that pinEvents should be triggered so as not to be detected as anomaly.

Current behavior:

This is more of a question, I am not sure whether pinEvents are triggered or not.

Metadata:

  • Script name: FUT Auto Relist Unsold Transfers
  • Script version:
  • Browser:
  • OS:

[request] auto login if presented Login button, enter credentials in EA login screen

Expected behavior:

Sometimes the webapp will show a Login button, when clicking on it, sometimes it will redirect to EA login screen for you to enter username/password. If the script could automate this, it would be great. We could probably enter the credentials in some settings page.

Current behavior:

Give a detailed explanation of the current behavior.

Metadata:

  • Script name:
  • Script version:
  • Browser:
  • OS:

Seperate scripts or single script?

PR #45 got me thinking, and I would like to discuss this new idea before acting on it.

Having many loose scripts looks good at first sight, but gets cumbersome soon from a development perspective. If you want two pieces of functionality that look very similar but have a different purpose, either a lot of code needs be duplicated. The other option is that the scripts can be merged with a branch for the two functionalities. However, there is currently not a good way to set options for each script, because GM_setValue/GM_getValue can only set and get data from the script they are running in.

A solution to this problem could be to provide all the current scripts as a single scripts, where you can enable and disable each option. The Settings script provides an example of where you could enable and disable options. This way we can be sure that you either have the default settings or only enable what you want, because the settings script would also be included.

What do you guys think about this? Is a single script better for you as a user if you have in-app settings, or do you prefer separate scripts for each functionality?

[request] add documentation on details about the Javascript code used by Fifa web app

Expected behavior:

Thanks for working on these scripts, they are really helpful. It seems you probably have a good understanding of the Javascript code used in the web app, as in the scripts you are sometimes calling directly into the existing code, adding listeners/observers, calling services, querying state of items.

It would be great if you could document what you know so far about working with the webapp. This would make reading and understanding the scripts you have written easier. People thinking about contributing can do so more easily.

Current behavior:

Give a detailed explanation of the current behavior.

Metadata:

  • Script name:
  • Script version:
  • Browser:
  • OS:

auto confirm buy now

Expected behavior:

When Buy Now is clicked, the confirmation Pop Up shouldnt pop up and be confirmed directly instead

Current behavior:

Whenever the Buy Now tab is clicked the Pop up still comes and is not confirmed.
Does it only work for bidding? If yes than maybe the name is a little bit Confusing with "FUT Confirm Buy Now"

Metadata:

  • Script name: FUT Confirm Buy Now
  • Script version: 0.1.2
  • Browser: Firefox
  • OS: Mac OS

Nothing works in Windows 10

Nothing is really working except UI (show BIN button and settings page) in both Chrome and Opera browsers.

It's really strange... on my mac its working..

Futbin price not displaying for me

Hey guys, I'm running this on firefox and what doesnt seem to be working for me is the search lowest bin, show club / transfer list value, and the display of the futbin price. Any idea on how I can fix this?

Show Futbin price after searching in club

Issue branched from #25.

Expected behavior:

When going to the Club -> Players, when you search, show Futbin prices

Current behavior:

The Futbin prices are not shown after searching.

Metadata:

  • Script name: show-futbin-player-price
  • Script version: 0.2.5
  • Browser: Chrome v61
  • OS: macOS 10.12.6

Change transfer list relist price before expiration

In the current implementation, the complete transfer list is relisted whenever auctions expire. This doesn't give you a lot of room to update the pricing for a specific item.

It would be nice if you were be able to adjust the price for relisting before expiration (this would require the use of local storage). Or perhaps automatically using a percentage above the minimum BIN price (found on Futbin or on the market itself).

Something to keep in mind is rate limiting. Because when you have the maximum transfer list size it could be 100 items, that would potentially mean 100 individual relist requests.

[Suggestion] Link to Futbin page of a player

It would be very useful to be able to click on the current Futbin price icon.
This click would open the Futbin page of the player in a new tab of the browser.
It could be very useful to quickly check the price history of a player.

Auto "BuyNow" in one click, or a shortcut

Splitted from issue #1.

Disable the Buy Now confirmation dialog. This can be accomplished through the gPopupClickShield object. Possibly there is a better way to achieve this result, but when there is an active popup, the Buy Now can be confirmed using this code:

gPopupClickShield._activePopup._eOptionSelected(2);

All we need is a way to detect if the popup is shown. Perhaps using $(document).bind('DOMNodeInserted', fn);, and then checking if the _title property of the acive popup is "popup.buyNowConfirmationTitle"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.