Dexmaster Author




Re: @Marti:
Thank you for understanding, I'm not stealing any code here, I've just wanted for @laminblur to mention about new version of CFS in Description section of this script.

Because it come as first in google search for "Custom Feedly Styles" so people could find out about newer (for now only fixed) version of it ).

Thant's all really to it.


Re: @fajfka:
I could make something similar in CFS (but better with color picker and stuff) and make small separate script for "feedly icons(favicons) for each row" with only one option and without styling. (I think it would be more productive, also I'll make my own version of it, from scratch and without jQuery)



Re: @Marti: I made a fork, but he haven't made any changes in code from my original sript.

laminblur compared to original code (http://userscripts-mirror.org/scripts/show/171749) only replaced 2 lines (12 and 13) from Userscript block.
From

/// @installURL http://userscripts.org/scripts/source/171749.user.js
// @updateURL http://userscripts.org/scripts/source/171749.meta.js

to

// @installURL http://userscripts-mirror.org/scripts/source/171749.user.js
// @updateURL http://userscripts-mirror.org/scripts/source/171749.meta.js

That's all I could add him to @contributor or @attribution I just didn't think it was needed.

I haven't even used these two lines, and I've later found out that forking leaves links.


For everybody that is looking for a newer version of the same script, I've restarted maintaining it and adding new features.

Current version is 3.0.1(RC1), also it would be great if laminblur would add this link to Script Info Section. Thank you very much!
Custom Feedly Styles

And sorry for a long absence.

P.S. Discussion about CFS began by this reddit discussion.





Ok I'll look into it today.

P.S. New version would be in 1 day, and have lot's of things I've added )


Sometimes people are looking for some features and these features are not issues(just ideas or questions), so logically it would be good to add Discuss section (Almost identical copy of Issues section).

Also script reviews would be good solutions to understand users opinions on this or that script.

What do you think? I can help(implementing it) if you'll accept this idea.


Also you'll probably need to reload page on timeout

setTimeout(function(){
    window.location.reload();
    /* or window.location = window.location.href; */
}, (int)( 1000 * 60 * ( 30 + ( Math.random() * 30 ) ) ) ); // (1sec * 60 * (30 + 0~30)) 30~60 minutes

Now to get out a value you'll just need to output into console GM_getValue("my_vals") or localStorage.my_vals.

This will look like this.

console.log( localStorage.my_vals );

or

console.log( GM_getValue( "my_vals" ) );

That's All Folks!

Final versions:
Test Script Saver (GM_getValue/GM_setValue)
or
Test Script Saver (localStorage)


First of all. you should know your page URL mask check what does your page look like, for now lets say it looks like:

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit

so for future reference our include rule will look like this:
// @include http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit

Now lets see what can we do with value we have on a page. Lets say it's an input field with name "LastName" current value "Mouse". You need to read a bit about selectors, but it's not hard, you also could use a browser element inspector, it will help with. We have this html body form input[name="LastName"] selector.

Lets check it with browser console (Use F12 hotkey to check it yourself on page http://www.w3schools.com/tags/tryhtml_form_submit.htm )
We need to get ".value" of this field so let's use document.querySelector('html body form input[name="LastName"]').value

Now we have value, let's save it. Generally Userscripts use LocalStorage or GM_getValue/GM_setValue functions. We'll use GM_getValue/GM_setValue.
First we'll need to grant them both. It's Userscript MetaValue like this:

// @grant       GM_getValue
// @grant       GM_setValue

Lets also forbid frames and add a rule to run script at documents end.

// @noframes
// @run-at      document-end

So our script will look like this:

// ==UserScript==
// @author      Dexmaster
// @grant       GM_getValue
// @grant       GM_setValue
// @include     http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit
// @name        Test Script Saver (GM_getValue/GM_setValue)
// @namespace   TestScript
// @noframes
// @run-at      document-end
// @version     0.1
// ==/UserScript==
(function () {
    "use strict";

    document.addEventListener("DOMContentLoaded", function() {

        var el = document.querySelector('html body form input[name="LastName"]'), vals = GM_getValue("my_vals", []);

        if (el !== undefined) { // If element exists
            if (vals.indexOf(el.value) < 0) { // And was not added
                vals.push(el.value); // ADD Value TO AN ARRAY
                GM_setValue("my_vals", vals); // Save Array
            }
        }

    });

}());

And another example using localStorage:

// ==UserScript==
// @author      Dexmaster
// @grant       none
// @include     http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit
// @name        Test Script Saver (localStorage)
// @namespace   TestScript
// @noframes
// @run-at      document-end
// @version     0.1
// ==/UserScript==
(function () {
    "use strict";

    document.addEventListener("DOMContentLoaded", function () {

        var el = document.querySelector('html body form input[name="LastName"]'), my_vals = [];

        if (el !== undefined) { // If element exists
            if ((localStorage.my_vals === null) || (localStorage.my_vals === undefined) || (typeof localStorage.my_vals !== "string") || (localStorage.my_vals === "")) {
                my_vals[0] = el; // FIRST VAL IN ARRAY ))
            } else {
                my_vals = JSON.parse(localStorage.my_vals);
                if (my_vals.indexOf(el) < 0) {
                    my_vals.push(el); // ADD VAL TO ARRAY
                }
            }
            if (typeof my_vals === "object") {
                localStorage.my_vals = JSON.stringify(my_vals); // SAVE VALS ARRAY TO STORAGE
            }
        }

    });

}());

Greasemonkey is strict. You just need to @grant access to all functions you've used, add ```
// @grant GM_xmlhttpRequest


it will look like this

// ==UserScript==
// @name Pixiv AJAX bookmarking
// @namespace RevPsych
// @description Allows bookmarking images on Pixiv without leaving the image page.
// @include pixiv.net/
// @grant GM_xmlhttpRequest
// @version 0.2
// ==/UserScript==



You could even get money by striking such deal with some company, they are already paying money to get traffic there.


Quotes:

For Quotes suggest using Tables with right alignment.

This:

| “Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.” |
|--:|
| _― Albert Einstein_ |

Looks like this:

“Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.”
― Albert Einstein

Blockquotes:

One (>) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in condimentum ante. Sed tincidunt lectus vitae euismod pellentesque.

Two (>>) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in condimentum ante. Sed tincidunt lectus vitae euismod pellentesque.

Three (>>>) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in condimentum ante. Sed tincidunt lectus vitae euismod pellentesque.

Four (>>>>) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in condimentum ante. Sed tincidunt lectus vitae euismod pellentesque.

P.S. Blockquotes ">" as Headers "#" does not work insode a table use "&emsp;" and "__Text__"


Previous table:
| Left | Center | Right |
|:-|:-:|-:|
| _Left_ | __Center__ | ___Right___ |


Tables are ok, but you cant combine columns/rows and use headers inside.

But it's easy to use and you don't need a lot of "-" so here is

Left Center Right
Left Center Right

| Left | Center | Right | |:-|:-:|-:| | _Left_ | __Center__ | ___Right___ |


GitHub Flavored Markdown looks good but if you need to structure your text in different proportions or add margins/paddings it's awful


I found out there are no tabs (&#09;) and the biggest spacer I could find was (&emsp;).

| | &#09;
| | &nbsp;
| | &ensp;
| | &emsp;





To @Marti

I've just tested everything I found on Markdown on my profile page.

I feel a bit bad about tables and spacings. Is there a way to combine rows/columns?? Is &#38;&#110;&#98;&#115;&#112;&#59; the only way to create space??