0

I have this piece of javascript for a RSS feed and I want to be able to edit the CSS to my taste, however there is an existing inline style sheet over-riding my preferences.

Any ideas on how to remove the inline CSS and use an external style sheet instead?

Here is the piece of javascript that I have...

<!-- start feedwind code --><script type="text/javascript">document.write('<script type="text/javascript" src="' + ('https:' == document.location.protocol ? 'https://' : 'http://') + 'feed.mikle.com/js/rssmikle.js"><' + '/script>');</script><script type="text/javascript">(function() {var params = {rssmikle_url: "http://youtube.com/user/ReoNaomiMUA",rssmikle_frame_width: "300",rssmikle_frame_height: "400",rssmikle_target: "_blank",rssmikle_font: "Arial, Helvetica, sans-serif",rssmikle_font_size: "12",rssmikle_border: "off",responsive: "off",rssmikle_css_url: "",text_align: "left",text_align2: "left",corner: "off",scrollbar: "on",autoscroll: "off",scrolldirection: "up",scrollstep: "3",mcspeed: "20",sort: "New",rssmikle_title: "off",rssmikle_title_sentence: "",rssmikle_title_link: "",rssmikle_title_bgcolor: "#0066FF",rssmikle_title_color: "#FFFFFF",rssmikle_title_bgimage: "",rssmikle_item_bgcolor: "#FFFFFF",rssmikle_item_bgimage: "",rssmikle_item_title_length: "55",rssmikle_item_title_color: "#FF12D0",rssmikle_item_border_bottom: "off",rssmikle_item_description: "title_only",item_link: "off",rssmikle_item_description_length: "150",rssmikle_item_description_color: "#333333",rssmikle_item_date: "gl1",rssmikle_timezone: "Etc/GMT",datetime_format: "%b %e, %Y %l:%M:%S %p",item_description_style: "text+tn",item_thumbnail: "crop",article_num: "15",rssmikle_item_podcast: "player",keyword_inc: "",keyword_exc: ""};feedwind_show_widget_iframe(params);})();</script>
Uğur Aldanmaz
  • 1,018
  • 1
  • 11
  • 16
Sam Pittman
  • 189
  • 1
  • 3
  • 10
  • `Any ideas on how to remove the inline css` => [**Idea 1**](http://stackoverflow.com/questions/14383668/remove-inline-css-of-an-html-elements), [**Idea 2**](http://stackoverflow.com/questions/2027935/how-to-remove-css-property-using-javascript), [**Idea 3**](http://stackoverflow.com/questions/4033004/remove-a-specifc-inline-style-with-javascriptjquery) **:)** – NoobEditor Sep 20 '14 at 17:49

2 Answers2

1

Seems like you have used http://feed.mikle.com/ to create an RSS Feed Widget.

There are 3 ways in which you can customize the RSS feed.

  1. Customize the widget by using http://feed.mikle.com itself.
  2. Writing your own RSS reader and applying your own styles (JavaScript parser would be the easiest) How to parse an RSS feed using JavaScript?
  3. Editing the given JavaScript code to match your needs since the code itself contains all the style information. See below.
    (function() {
        var params = {
            rssmikle_url: "http://youtube.com/user/ReoNaomiMUA",
            rssmikle_frame_width: "300",
            rssmikle_frame_height: "400",
            rssmikle_target: "_blank",
            rssmikle_font: "Arial, Helvetica, sans-serif",
            rssmikle_font_size: "12",
            rssmikle_border: "off",
            responsive: "off",
            rssmikle_css_url: "",
            text_align: "left",
            text_align2: "left",
            corner: "off",
            scrollbar: "on",
            autoscroll: "off",
            scrolldirection: "up",
            scrollstep: "3",
            mcspeed: "20",
            sort: "New",
            rssmikle_title: "off",
            rssmikle_title_sentence: "",
            rssmikle_title_link: "",
            rssmikle_title_bgcolor: "#0066FF",
            rssmikle_title_color: "#FFFFFF",
            rssmikle_title_bgimage: "",
            rssmikle_item_bgcolor: "#FFFFFF",
            rssmikle_item_bgimage: "",
            rssmikle_item_title_length: "55",
            rssmikle_item_title_color: "#FF12D0",
            rssmikle_item_border_bottom: "off",
            rssmikle_item_description: "title_only",
            item_link: "off",
            rssmikle_item_description_length: "150",
            rssmikle_item_description_color: "#333333",
            rssmikle_item_date: "gl1",
            rssmikle_timezone: "Etc/GMT",
            datetime_format: "%b %e, %Y %l:%M:%S %p",
            item_description_style: "text+tn",
            item_thumbnail: "crop",
            article_num: "15",
            rssmikle_item_podcast: "player",
            keyword_inc: "",
            keyword_exc: ""
        };
        feedwind_show_widget_iframe(params);
    })();
Community
  • 1
  • 1
Harshadewa
  • 21
  • 6
  • @TJ, what do you mean? – Harshadewa Sep 21 '14 at 04:17
  • Is that css? doesn't look like it. There is a code block available in the editor. and please format it properly so that it's readable. – T J Sep 21 '14 at 07:56
  • 1
    @TJ It is not CSS. It is a JavaScript code that Sam Pittman showed in the question. I used the same and highlighted where he should change as the solution. Please read the question, and answers properly. – Harshadewa Sep 21 '14 at 16:13
0

First port of call would be to try and modify the feed's styles using the customisation tools provided on the feed's website. Failing this, you could try to modify/remove the inline styles using JQuery after the feed has loaded on the page.

Anthony
  • 99
  • 6
  • This may sound a silly question as I'm relatively new to this, but where are the inline styles picked up from? I'm only really familiar with external css etc – Sam Pittman Sep 20 '14 at 17:49
  • @SamPittman I guess they come from the code in which you want to remove them. Anyway I feel like your question is unclear. – King King Sep 20 '14 at 17:51
  • @SamPittman As King King has said, the inline styles are part of the code which is generated, for example, inside the code you have posted, there is the following line: rssmikle_item_description_color: "#333333". This gets turned into an inline style by the script. You can modify these using JQuery once the feed has loaded. – Anthony Sep 21 '14 at 12:49