Grab Link Toped

Go to 10 Ribu Orderan Per Hari!

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Grab Link Toped
// @namespace    http://tampermonkey.net/
// @version      0.20.91
// @description  Go to 10 Ribu Orderan Per Hari!
// @author       Jamielcs
// @match        https://www.tokopedia.com/manage-product-new.pl*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
 $('div.maincontent-admin.maincontent-admin--manageProduct').first().prepend($('\
<textarea id="kws" style="width:99%" rows=15></textarea>\
<button class="getlinktoped" style="display:block;width:100%;background:black;color:white">Get LInk</button>\
'));
    $('.getlinktoped').click(function(){
        var kws = document.getElementById('kws');
        kws.value='';
        var as = document.querySelectorAll('a.break-link.fs-13.fw-600.el');
        for(var i = 0; i < as.length; i++) {
            var anchor = as[i].pathname.split(/[\/\.]/).sort(function(a, b) { return b.length - a.length; }).shift().replace(/[-_\s]+/g,' ');
            var kw = as[i];
            if(kw) kws.value = kws.value+'<a target="_blank" href="'+decodeURIComponent(kw)+'">'+(anchor)+'</a><br/>\n';
        }
    });
})();