Read weibo articles better

in utopian-io •  7 years ago  (edited)

New Projects

  • What is the project about?

Weibo for Chinese equal to Facebook + Twitter, there are lots of articles, far more than steemit.

The article on mobile is more beautiful and comfortable than on PC, so I redirect them to mobile mode anywhere.

However, there are two problems at least:

  1. Readers need to click the "加载全文" button to get full text:
    图片.png

  2. The title show on tab is "微博" (weibo) on any article.
    图片.png

My script aims to fix them.

Install Firefox/Chrome and Greasemonkey/Tampermonkey/Violentmonkey, and visit the script, install confirm.

Test URL: https://media.weibo.cn/article?id=2309351000454085965172930731

  1. Full text will be auto loaded:
    图片.png

  2. Tab title will show the article title:
    图片.png

By the way, this title fix can work with OneNote Clipper:
图片.png

  • Technology Stack
var runcount = 0;
function clickbutton() {
  runcount = runcount + 1;
  if(runcount>9){runcount=10;return;}
  var buttonone = document.getElementsByClassName("m-font-arrow-down");
  var titleone  = document.getElementsByClassName("m-text-cut-2")[0].innerHTML;
  var i;
    for (i = 0; i < buttonone.length; i++) {
      buttonone[i].click();
      document.title = titleone;
    }
}
setInterval(clickbutton, 1);

Direct simulation of click buttons doesn't work, so I use for loops;

There is only one "加载全文" button, so get it directly;

There are one or two or more title for different articles, so we need to get the first of them.

  • Roadmap

I'd like to add support Firefox for android. Everyone can pull request for that.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  7 years ago Reveal Comment

Your contribution cannot be approved because it is a very small contribution as compared to other contributions. Next time try to add more features into a single contribution, also from next time you should add the commits you have worked on for the contribution.

You can contact us on Discord.
[utopian-moderator]