Skip to content

Instantly share code, notes, and snippets.

@ThisIsAreku
Last active March 25, 2021 12:59
Show Gist options
  • Save ThisIsAreku/de3e3c17224b7ceb1deeec26b8c079f8 to your computer and use it in GitHub Desktop.
Save ThisIsAreku/de3e3c17224b7ceb1deeec26b8c079f8 to your computer and use it in GitHub Desktop.
Fixes for the steamtradematcher website
// ==UserScript==
// @name STM Fix
// @namespace http://www.steamtradematcher.com
// @version 0.2
// @description Fixes for the Steam Trade Matcher website
// @author ThisIsAreku
// @match https://www.steamtradematcher.com/compare
// @icon http://www.steamtradematcher.com/res/img/favicon.jpg
// @updateURL https://gist.github.com/ThisIsAreku/de3e3c17224b7ceb1deeec26b8c079f8/raw/stmfix.user.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
function createSaleItemFilter() {
const filterItemContainer = document.createElement('div')
filterItemContainer.classList.add('col-sm-4', 'filter-box-item')
filterItemContainer.style.display = 'inline'
const filterLabelContainer = document.createElement('label')
const filterItemElement = document.createElement('span')
filterItemElement.classList.add('count-filter-game', 'count-filter-item-SaleItem')
filterItemElement.innerText = '(0)'
const filterCheckboxElement = document.createElement('input')
filterCheckboxElement.setAttribute('type', 'checkbox')
filterCheckboxElement.checked = true
filterCheckboxElement.disabled = true
filterLabelContainer.appendChild(filterCheckboxElement)
filterLabelContainer.appendChild(filterItemElement)
filterLabelContainer.appendChild(document.createTextNode(' Items'))
filterItemContainer.appendChild(filterLabelContainer)
const container = document.querySelector('#filter-box-items')
container.appendChild(filterItemContainer)
}
createSaleItemFilter()
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment