YahooFinance

Add StockCharts AND stockTwits links to YahooFinance .

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name YahooFinance
// @namespace https://greasyfork.org/en/scripts/10358-YahooFinance
// @version    0.4
// @description  Add StockCharts AND stockTwits links to YahooFinance .
// @include http://finance.yahoo.com/*
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @copyright  Daif Alotaibi E-mail: [email protected]
// ==/UserScript==


$(document).ready( function(){
    if($('div.title h2').length>0 ) {
        $symbol = $('div.title h2').text().match(/\((.+)\)/)[1];
        $links  = ' <span style="background:#eee">';
        $links += '<a style="color: #333367;" href="http://stockcharts.com/h-sc/ui?s='+$symbol+'">StockCharts</a>';
        $links += ' , <a style="color: #313131;" href="http://stocktwits.com/symbol/'+$symbol+'">StockTwits</a>';
        $links += '</span> ';
        $($('div.title h2')).after($links);
    }
});