User:Learn more/Tampermonkey

From ReactOS Wiki
Jump to: navigation, search

Tampermonkey scripts

All scripts available at: https://github.com/learn-more/tampermonkey/


Highlight some tests in testman

// ==UserScript==
// @name         Highlight some testman tests
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Mark Jansen
// @match        https://reactos.org/testman/*
// @match        https://www.reactos.org/testman/*
// @grant        none
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==

(function() {
    'use strict';
    var tests = [
            'atl:CComBSTR',
            'atl:CComHeapPtr',
            'ntdll:NtMapViewOfSection',
            'ntdll:NtApphelpCacheControl',
            'ole32:initializespy',
            'pefile:ntoskrnl_SectionFlags',
            'sdk:delayimp',
            'shell32:assoc',
            'shell32:CShellDesktop',
            'shell32:shelldispatch',
            'wintrust:softpub',
            'msgina:ShellDimScreen',
            'atl:atltypes',
            'atl:CRegKey',
            'atl:CString',
            'msvcrt_crt:__getmainargs',
            'gdi32_apitest:AddFontMemResourceEx'
            ];
    var result = 'tr[title="' + tests.join('"],tr[title="') + '"],tr[title^="apphelp:"],tr[title^="appshim:"]';

    $('iframe').load( function() {
        $('iframe').contents().find("head")
            .append($('<style type="text/css">' + result + '{ font-weight: bold; color: red; }' + '</style>'));
    });
    $("head").append($('<style type="text/css">' + result + '{ font-weight: bold; color: red; }' + '</style>'));

})();