Skip to content

Instantly share code, notes, and snippets.

@ddrpa
Last active May 3, 2022 10:09
Show Gist options
  • Save ddrpa/e4b418a4706ef06a8b4f2e2a89bfaf84 to your computer and use it in GitHub Desktop.
Save ddrpa/e4b418a4706ef06a8b4f2e2a89bfaf84 to your computer and use it in GitHub Desktop.
replace emotions with larger icon in steam activity editor
{
"request": [
{
"enable": true,
"name": "replace resources from community.cloudflare.steamstatic.com",
"ruleType": "redirect",
"matchType": "regexp",
"pattern": "https://community.cloudflare.steamstatic.com/economy/emoticon/(.*)",
"exclude": "",
"group": "steam",
"isFunction": false,
"action": "redirect",
"to": "https://community.cloudflare.steamstatic.com/economy/emoticonlarge/$1"
},
{
"enable": true,
"name": "replace resources from steamcommunity-a.akamaihd.net",
"ruleType": "redirect",
"matchType": "regexp",
"pattern": "https://steamcommunity-a.akamaihd.net/economy/emoticon/(.*)",
"exclude": "",
"group": "steam",
"isFunction": false,
"action": "redirect",
"to": "https://steamcommunity-a.akamaihd.net/economy/emoticonlarge/$1"
},
{
"enable": true,
"name": "replace resources from community.akamai.steamstatic.com",
"ruleType": "redirect",
"matchType": "regexp",
"pattern": "https://community.akamai.steamstatic.com/economy/emoticon/(.*)",
"exclude": "",
"group": "steam",
"isFunction": false,
"action": "redirect",
"to": "https://community.akamai.steamstatic.com/economy/emoticonlarge/$1"
}
],
"sendHeader": [],
"receiveHeader": [],
"receiveBody": []
}
// ==UserScript==
// @name Extends emotions select popup in steam activity
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 扩大 steam 动态编辑器中的表情选择器
// @author amethystek
// @match http*://steamcommunity.com/profiles/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const POPUP_CONTAINER_WIDTH = 600;
const POPUP_CONTAINER_HEIGHT = 200;
function addGlobalStyle(css) {
const head = document.getElementsByTagName('head')[0];
let style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle(
`.playerAvatar .profile_avatar_frame { z-index: auto !important }
.emoticon_popup.es_emoticons { max-width:${POPUP_CONTAINER_WIDTH}px !important;width:${POPUP_CONTAINER_WIDTH}px !important; }
.emoticon_popup_content { max-width:${POPUP_CONTAINER_WIDTH}px !important;width:${POPUP_CONTAINER_WIDTH}px !important;max-height:${POPUP_CONTAINER_HEIGHT}px !important;height:${POPUP_CONTAINER_HEIGHT}px !important; }
.emoticon_popup_content .emoticon_option { width:64px !important;line-height:54px !important;height:54px !important;}
.emoticon_popup_content .emoticon_option img { width:54px !important;height:54px !important;}`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment