Skip to content

Instantly share code, notes, and snippets.

@lnovy
Created September 20, 2015 14:45
Show Gist options
  • Save lnovy/c887b37941527a4120f2 to your computer and use it in GitHub Desktop.
Save lnovy/c887b37941527a4120f2 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Facebook? Nevim!
// @description Facebook? Nevim!
//
// @author Lukas Novy <lukas.novy@pirati.cz>
// @namespace http://github.com/krtek-net
//
// @license GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
// @copyright Copyright (C) 2015, by Lukas Novy <lukas.novy@pirati.cz>
//
// @include *://*/*
// @match *://*/*
//
// @require http://code.jquery.com/jquery-1.8.0.min.js
//
// @version 1.0
//
// @run-at document-end
// @unwrap
// ==/UserScript==
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function() {
function nevim() {
$("*:contains('To se mi líbí')").each(function() {
if ($(this).children().length)
return;
if ($(this).text() == 'To se mi líbí')
$(this).text("Nevím!");
});
$("*:contains('Like')").each(function() {
if ($(this).children().length)
return;
if ($(this).text() == 'Like')
$(this).text("Nevím!");
});
$("*:contains('Už se mi to nelíbí')").each(function() {
if ($(this).children().length)
return;
if ($(this).text() == 'Už se mi to nelíbí')
$(this).text("Už vím!");
});
$("*:contains('Unlike')").each(function() {
if ($(this).children().length)
return;
if ($(this).text() == 'Unlike')
$(this).text("Už vím!");
});
}
$(document).ajaxStop(function() {
nevim();
});
nevim();
setInterval(nevim, 1000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment