Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: a quick javascript/styling hack  (Read 2828 times)

0 Members and 1 Guest are viewing this topic.

Gherald

  • Minion
  • *****
  • Offline Offline
  • Posts: 676
  • Awe: +35
  • Respect: +1399
    • View Profile
a quick javascript/styling hack
« on: March 19, 2013, 05:00:23 am »
+3

To prevent accidental sharing and "demands are made of no one" , I wanted to make the little corner exclamation mark more blatantly obvious:



That's using Greasemonkey in Firefox or Tampermonkey in Chrome.  Here's the code:

Code: [Select]
// --------------------------------------------------------------------
// ==UserScript==
// @name          Innovation enhancer
// @namespace     Innovation
// @description   Innovation
// @version       0.02
// @include       *innovation.isotropic.org*
// @grant         GM_getValue
// @grant         GM_setValue
// @require       https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==

self = unsafeWindow;
window = unsafeWindow;

$("head").append("<style type='text/css'> \
img.cornerwarn { \
  background-color:red; \
  width:60px; \
  height:30px; \
  right:30px; \
  top: 23px;   \
} \
img.iconcountimg { \
  height: 0px \
} </style>");

I also hid the icons under your own resource counts since they just distract from quickly comparing lines.

Quick tweaks, but they seem helpful to me.  Now to go playtest.. : )

--
Edit:  made position relative to top of instead of bottom of card.  So it's an "upper right" corner warning now.
« Last Edit: March 19, 2013, 05:17:18 am by Gherald »
Logged
My opponent has more loot than me

Gherald

  • Minion
  • *****
  • Offline Offline
  • Posts: 676
  • Awe: +35
  • Respect: +1399
    • View Profile
Re: a quick javascript/styling hack
« Reply #1 on: March 19, 2013, 10:03:01 pm »
0

So, I'm definitely making better decisions and playing faster :)
Logged
My opponent has more loot than me

alcaras

  • Pearl Diver
  • **
  • Offline Offline
  • Posts: 12
  • Respect: +5
    • View Profile
    • Subcreation
Re: a quick javascript/styling hack
« Reply #2 on: May 29, 2013, 02:22:27 pm »
0

Nicely done!
Pages: [1]
 

Page created in 1.515 seconds with 20 queries.