Difference between revisions of "User talk:Learn more/Tampermonkey"

From ReactOS Wiki
Jump to: navigation, search
Line 27: Line 27:
:Due to this rewrite, the overflow becomes a problem in chrome as well. [[User:Learn more|Learn more]] ([[User talk:Learn more|talk]]) 14:14, 27 April 2017 (UTC)

Revision as of 14:14, 27 April 2017

Suggestion: add CSS "height: auto" to Patchbot links script

The links don't show for me on Firefox because height=42 & overflow=hidden, thus I suggest adding "height auto" which can be done like this:

        $(this).parent().parent().css("height", "auto");

AddLinks only works on Your dashboard

You're using an element id which ends up being different on different people's JIRA dashboards, thus this won't work as intended (or in some cases, at all) on other people's dashboards.

I reworked it a bit to use class instead of id, make it fit in a bit better stylistically, and add the links on multiple instances of the quick links dashboard item (just in case).

(function() {
    'use strict';
    var title = "More";
    var newquicklinks = [
        '<a href="//reactos.org/testman/" target="_blank" title="View automatic regression test data">Testman</a>',
        '<a href="//build.reactos.org/builders" target="_blank" title="View recent continuous integration status results">Buildbot</a>',
        '<a href="//reactos.org/wiki" target="_blank" title="View or edit the wiki">Wiki</a>'
    var quicklinksdashboarditems = document.getElementsByClassName("quicklinks-dashboard-item");
    var i;
    for (i=0; i < quicklinksdashboarditems.length; i++) {
        quicklinksdashboarditems[i].insertAdjacentHTML('beforeend', '<ul class="quicklinks-links-list"><h6 class="list-label">' + title + '</h6><li>' + newquicklinks.join('</li><li>') + '</li></ul>');

Due to this rewrite, the overflow becomes a problem in chrome as well. Learn more (talk) 14:14, 27 April 2017 (UTC)