Skip to content

Instantly share code, notes, and snippets.

@ifo
ifo / rcScoutTargetFix.js
Created September 11, 2017 00:12
Safely force RC Scout links to open in a new tab on click.
// Wrap this in a <script></script> tag
// and paste it directly below your RC scout script tag.
;(function() {
'use strict';
// Don't do anything if rcs isn't loaded.
if (!window._rcs) { return }
// Get the a tag class name.
var className = window._rcs.inst.prefix + "__link";
// Get all the a tag links.
var links = document.getElementsByClassName(className);

Keybase proof

I hereby claim:

  • I am ifo on github.
  • I am ifo (https://keybase.io/ifo) on keybase.
  • I have a public key ASCbsp7PsmX0VR2ustbLYyMyWaqJ1TFX-o_TbbZvhBoqjgo

To claim this, I am signing this object:

@ifo
ifo / gist:c8e1b648006361ea67d8
Created April 20, 2015 18:23
Dota 2 API Live Matches JSON example
{
"result": {
"games": [
{
"players": [
{
"account_id": 224585413,
"name": "Standin.ARTSTYLE",
"hero_id": 42,
"team": 0
require 'sinatra';set port: 4568;%w[get put post delete options patch].map{|m| send(m, '*'){503}}