Udemy Course Creation Date

trying to make the world a better place!

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Udemy Course Creation Date
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  trying to make the world a better place!
// @author       scriptbug
// @match        https://www.udemy.com/course/*
// @icon         https://www.google.com/s2/favicons?domain=tampermonkey.net
// @grant        GM_addStyle
// @require    http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
var $ = window.$;
var x = document.body.getAttribute("data-clp-course-id");
//var button = document.createElement("Button");
//$(button).attr("id","SomeID");
//button.innerHTML = x;
//button.style = "top:0;left:0;position:fixed;z-index:99999;padding:20px;";
 $.get("https://www.udemy.com/api-2.0/courses/"+x+"/?fields[course]=created", function(data, status){
    var date = data.created;
     var d = new Date(date);
     var forD = d.getMonth()+"/"+d.getFullYear();
     document.querySelector("#udemy > div.main-content-wrapper > div.main-content > div.paid-course-landing-page__container > div.top-container.dark-background > div > div > div:nth-child(4) > div > div.udlite-text-sm.clp-lead > div.clp-lead__element-meta > div:nth-child(1) > div > div > span:nth-child(2)").innerHTML +=" Created Date " + forD;
  });

$(document).ready(function() {});
//document.body.appendChild(button);