关于前端:这个好习惯让你乌鸡变凤凰

5次阅读

共计 1270 个字符,预计需要花费 4 分钟才能阅读完成。

我最喜爱思否上的这两种文章:
一种是国外文章全文翻译,而后打上「原创」标签。
另一种是 gayhub 上的 markdown 工程师罕用的赚 star 套路:awesome anything。
共同点是文章最初总会有个公众号二维码,关注了就能入职加薪升职。

真的很不错,很感激这些文章。
我再也不必追踪大佬的 twitter、github 或者是他们的集体博客了,反正英文我也看不懂,右键全文翻译也不想点。
我也不必看 Medium / CSS Tricks / Smash Magazine / Dev.to / CoDrops 了,反正公众号的大佬们指定都是从这里获取的一手信息,指定会把最新最棒的前端资讯喂给我。
也不必订阅 newsletter、看 fe conf 的视频了,英文我也懒得听,字幕我也懒得开。

我只用每天在微信外面承受公众号更新就行了,每天通勤看两篇文章,我都能感觉本人在提高呢!


上面不阴阳怪气了,间接贴 tempermonkey 脚本:

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http*://segmentfault.com/*
// @grant        none
// ==/UserScript==

var elementList = [['.news-list', '.news-item.stream__item', '.author a'],
    ['.widget-top10', 'li.text-muted', '.ellipsis strong'],
    ['.stream-list.blog-stream', '.stream-list__item', '.author span a'],
    ['.list-unstyled.list-unstyled', '.widget-user', 'strong a']
];

var blockList = ['前端小智', '一生学习者', '懒懒的技术宅', '宜信技术学院', '夜尽天明', '疯狂的技术宅'];
setTimeout(function () {
    'use strict';
    elementList.forEach(([listSe, itemSe, charSe]) => {const scan = function () {const items = Array.from($(itemSe))
            items.forEach(item => {if (blockList.indexOf(item.querySelector(charSe).innerText) >= 0) {item.parentNode.removeChild(item)
                }
            })
        }
        if ($(listSe).length) {$(listSe)[0].addEventListener('DOMSubtreeModified', scan)
            scan()}
    })
}, 500)

眼不见心不烦。


对了,我是不是也该贴个二维码呢:

正文完
 0