Minds Shekels

Shows comments on the right hand side of the page.

< 腳本Minds Shekels的回應

評論:正評 - 腳本一切正常

§
發表於:2018-05-17
編輯:2018-05-27

Changing the Minds.com logo with Token name, into Ferengi Latinum

As my first attempt at modifying a userscript for many years, I thought I might have a go at a simple image replacement. I thought I'd have a go at adding the following text at line 14, moving the closing brace down 1 line, as follows...

    // ==UserScript==
    // @name         Minds Latinum
    // @namespace    http://www.minds.com/
    // @version      0.1
    // @description  Turns Minds.com Tokens into Ferengi Latinum.
    // @author       TrisquelWhare (with original code by fffadsfasf)
    // @match        https://www.minds.com/wallet/tokens/contributions
    // @grant        none
    // @require      https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
    // ==/UserScript==

    window.onload = function() {
      $('m-wallet--balance-tokens h3')[0].innerHTML = 'Latinum';
      $('m-wallet--balance img')[0].innerHTML = '<img class="m-wallet--balance--logo" src="https://orig00.deviantart.net/95d3/f/2018/136/8/3/ferengi_fed_by_trisquelwhare-dcbqh46.png">';
    }

As much as I have tried, I cannot get this new line to work. Clearly I am referencing the original image wrong in the Minds.com source code. I've tried many different permutations, even an outerHTML rather than an innerHTML, but nothing seems to work for me. Can you please point me in the right direction?

發表回覆

登入以回復