Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes CSMoney Screenshot Buttons #232

Merged
merged 4 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ CSFloat has an extension for Firefox/Chrome that lets you fetch floats directly

## Features

* Assists in verifying trades for CSFloat Market
* Allows you to retrieve the float, paint seed, and float rank of any market or inventory item
* Allows you to fetch the 3D model and screenshot of the item directly on the page
* Fetches all floats on the page quickly and automatically on page load
* User-definable filters to highlight items with low floats or certain paint seeds
* Shows market item stickers at a glance and their wear
Expand Down
6 changes: 1 addition & 5 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "CSFloat Market Checker",
"short_name": "CSFloat",
"version": "4.2.5",
"description": "Shows the float value, paint seed, and screenshots of Counter-Strike (CS:GO & CS2) items on the Steam Market or Inventories",
"description": "Shows the float value, paint seed, and more of Counter-Strike (CS:GO & CS2) items on the Steam Market or Inventories",
"icons": {
"16": "icons/16.png",
"48": "icons/48.png",
Expand Down Expand Up @@ -55,10 +55,6 @@
"matches": ["*://*.steamcommunity.com/*"]
},
"web_accessible_resources": [
{
"resources": ["src/model_frame.html", "src/model_frame.js"],
"matches": ["https://steamcommunity.com/*"]
},
{
"resources": ["src/version.txt"],
"matches": ["https://csfloat.com/*"]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "csfloat-extension",
"version": "4.2.5",
"description": "Dedicated API for fetching the float value, paint seed, and screenshots of CS:GO items on the Steam Market or Inventories",
"description": "Dedicated API for fetching the float value, paint seed, and more of CS:GO items on the Steam Market or Inventories",
"main": ".eslintrc",
"directories": {
"lib": "src/lib"
Expand Down
5 changes: 2 additions & 3 deletions src/lib/bridge/handlers/execute_script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ export const ExecuteScriptOnPage = new PrivilegedHandler(
await chrome.scripting.executeScript({
target: {tabId: sender.tab?.id as number},
world: 'MAIN',
args: [chrome.runtime.id, chrome.runtime.getURL('src/model_frame.html')],
func: function ExtensionId(extensionId, modelFrameUrl) {
args: [chrome.runtime.id],
func: function ExtensionId(extensionId) {
window.CSFLOAT_EXTENSION_ID = extensionId;
window.CSFLOAT_MODEL_FRAME_URL = modelFrameUrl;
},
});

Expand Down
28 changes: 0 additions & 28 deletions src/lib/bridge/handlers/fetch_skin_model.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/bridge/handlers/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {StorageGet} from './storage_get';
import {StorageSet} from './storage_set';
import {RequestHandler} from '../types';
import {FetchPendingTrades} from './fetch_pending_trades';
import {FetchSkinModel} from './fetch_skin_model';
import {StorageRemove} from './storage_remove';
import {RequestType} from './types';
import {FetchExtensionFile} from './fetch_extension_file';
Expand All @@ -27,7 +26,6 @@ export const HANDLERS_MAP: {[key in RequestType]: RequestHandler<any, any>} = {
[RequestType.STORAGE_SET]: StorageSet,
[RequestType.STORAGE_REMOVE]: StorageRemove,
[RequestType.FETCH_PENDING_TRADES]: FetchPendingTrades,
[RequestType.FETCH_SKIN_MODEL]: FetchSkinModel,
[RequestType.FETCH_EXTENSION_FILE]: FetchExtensionFile,
[RequestType.ANNOTATE_OFFER]: AnnotateOffer,
[RequestType.EXTENSION_VERSION]: ExtensionVersion,
Expand Down
1 change: 0 additions & 1 deletion src/lib/bridge/handlers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export enum RequestType {
STORAGE_SET,
STORAGE_REMOVE,
FETCH_PENDING_TRADES,
FETCH_SKIN_MODEL,
FETCH_EXTENSION_FILE,
ANNOTATE_OFFER,
EXTENSION_VERSION,
Expand Down
13 changes: 11 additions & 2 deletions src/lib/components/market/item_row_wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {html, nothing} from 'lit';
import {css, html, nothing} from 'lit';

import {state} from 'lit/decorators.js';
import {CustomElement, InjectAppend, InjectionMode} from '../injectors';
Expand All @@ -17,6 +17,15 @@ import {pickTextColour} from '../../utils/colours';
@CustomElement()
@InjectAppend('#searchResultsRows .market_listing_row .market_listing_item_name_block', InjectionMode.CONTINUOUS)
export class ItemRowWrapper extends FloatElement {
static styles = [
...FloatElement.styles,
css`
.float-row-wrapper {
margin-bottom: 5px;
}
`,
];

@cache
get listingId(): string | undefined {
const id = $J(this).parent().find('.market_listing_item_name').attr('id');
Expand Down Expand Up @@ -144,7 +153,7 @@ export class ItemRowWrapper extends FloatElement {
const fadePercentage = this.asset && getFadePercentage(this.asset, this.itemInfo);

return html`
<div>
<div class="float-row-wrapper">
Float: ${this.itemInfo.floatvalue.toFixed(14)} ${renderClickableRank(this.itemInfo)}<br />
Paint Seed:
${formatSeed(this.itemInfo)}${fadePercentage !== undefined
Expand Down
167 changes: 0 additions & 167 deletions src/lib/components/market/skin_viewer.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/lib/page_scripts/market_listing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {init} from './utils';
import '../components/market/item_row_wrapper';
import '../components/market/skin_viewer';
import '../components/market/utility_belt';

init('src/lib/page_scripts/market_listing.js', main);
Expand Down
2 changes: 0 additions & 2 deletions src/lib/page_scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ async function initiateFirefox(scriptPath: string) {

// We want to inject the ID of the extension
const id = browser.runtime.id;
const modelUrl = browser.runtime.getURL('src/model_frame.html');
const entryScript = document.createElement('script');
entryScript.appendChild(
document.createTextNode(`
window.CSFLOAT_EXTENSION_ID = '${id}';
window.CSFLOAT_MODEL_FRAME_URL = '${modelUrl}';
`)
);
document.head.appendChild(entryScript);
Expand Down
1 change: 0 additions & 1 deletion src/lib/types/extension_globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ export {};
declare global {
interface Window {
CSFLOAT_EXTENSION_ID: string;
CSFLOAT_MODEL_FRAME_URL: string;
}
}
14 changes: 0 additions & 14 deletions src/model_frame.html

This file was deleted.

5 changes: 0 additions & 5 deletions src/model_frame.js

This file was deleted.

1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ module.exports = (env) => {
new CopyPlugin({
patterns: [
{from: 'icons', to: 'icons', context: '.'},
{from: 'src/model_frame.html', to: 'src/', context: '.'},
{from: 'src/global.css', to: 'src/', context: '.'},
{from: 'src/background_ff.html', to: 'src/', context: '.'},
{from: 'src', to: 'raw/', context: '.'},
Expand Down
Loading