CSS或Greasemonkey用于定位<a> element

时间:2017-02-17 03:55:09

标签: html css greasemonkey

I had been using Greasemonkey to successfully turn visited links red on Udemy's browse pages中的标题元素。

以下成功:

// @match         http*://www.udemy.com/*
// @run-at        document-start
// @grant         GM_addStyle
// ==/UserScript==
GM_addStyle ( " a:visited, .fl:visited { color: #CC0000 !important ;}     " );

但Udemy更改了页面,现在访问后我想变成红色的标题看起来像这样:

<div class="card__head"> 
<a class="card__title" ng-href="/essential-cooking-skills/" ng-click="track('course-title')" href="/essential-cooking-skills/"> 
    <h1 ng-bind-html="::course.title">Essential Cooking Skills</h1>
</a> 

我尝试使用a.card__title.h1:visited来定位标签内的h1,但这似乎不起作用。有什么想法吗?

0 个答案:

没有答案