Replace Facebook 'Angry' with 'Dislike'

Makes it feel more like a dislike button!

当前为 2016-02-24 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Replace Facebook 'Angry' with 'Dislike'
// @namespace    http://kippykip.x10.mx/
// @version      1.1
// @description  Makes it feel more like a dislike button!
// @author       Kippykip
// @match        https://www.facebook.com/*
// @grant        none
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

//Replace the images and... that's it.
addGlobalStyle('._2p7a.anger{background-image:url(https://i.imgur.com/eXIS7xE.png) !important;background-repeat:no-repeat;background-size:auto;background-position:-17px -117px}');
addGlobalStyle('._2p79.anger{background-image:url(https://i.imgur.com/eXIS7xE.png) !important;background-repeat:no-repeat;background-size:auto;background-position:0 -219px}');
addGlobalStyle('._iuz{background-image:url(https://i.imgur.com/yjMwwcq.png) !important;background-repeat:no-repeat}');
//There was text replacing code here, but it was extremely buggy and can't figure it out so it's now removed. 
//Therefore it still says "Angry" when you hover over the buttons unfortunately.