// ==UserScript==
// @name         show link to trakt.tv
// @description  imdb.com (inspired by IMDB2Trakt from Arias)
// @version      1.0.2
// @grant        none
// @icon         http://www.google.com/s2/favicons?domain=www.imdb.com
// @namespace    https://github.com/solygen/userscripts
// @repository   https://github.com/solygen/userscripts.git
// @license      Public Domain (Unlicense)
//
// @include      http://www.imdb.com/title/*
// @include      https://www.imdb.com/title/*
//
// @updateURL    https://rawgithub.com/solygen/userscripts/master/scripts/imdb.com/link-to-trakt.user.js
// @downloadURL  https://rawgithub.com/solygen/userscripts/master/scripts/imdb.com/link-to-trakt.user.js
// @homepage     https://github.com/solygen/userscripts
//
// ==/UserScript==

(function () {

    'use strict';

    var container = document.querySelector('#overview-top .infobar'),
        separator = document.createElement('span'),
        node = document.createElement('a'),
        // uggly way of getting imdb-ID
        id = document.URL.substring(26, 35);

    // add separator char
    separator.innerHTML = '&nbsp;-&nbsp;';

    // href for searching with the imdb-ID
    node.href = 'http://trakt.tv/search/imdb?query=' + id;

    node.textContent = 'Search Trakt.tv';
    // node.setAttribute('target','_blank');

    container.appendChild(separator);
    container.appendChild(node);

})();

@@ -133,13 +133,13 @@
     
-1.0.2
+2.0.0
 %0A// 
@@ -856,30 +856,16 @@
 or('
-#overview-top .infobar
+.subtext
 '),%0A
@@ -1103,22 +1103,48 @@
  = '
-&nbsp;-&nbsp;'
+%7C';%0A    separator.classList.add('ghost')
 ;%0A%0A 

fix imdb