Diskussionen » Entwicklung

HOW TO FIX Rewritten_script_code must exist ERROR

§
Veröffentlicht: 06.08.2023

I NEED HELP FIXING THEASE ERRORS


Rewritten_script_code must exist

Default name is required - specify one with @name

Description is required - specify one with @description

ON LINE 1 AND 2

// ==UserScript==
// @name YouTube Custom Country Code
// @version 0.1
// @description Custom country code on YouTube

WITH THEASE SAYNTAXES

LINE 1
Unexpected tokest line 1, el 1
uspected taken at 11e 1, col 2.
Unexpected at line 1, es 1.
Expected LRRACE at line 1, co 36
Unexpected token at line 2, 60 36. Unexpected uten at line 2,2 27.

LINE 2
Unexpected token at line 2, co
Unexpected/' at line 2, col-2
Unknown @ rule: @name

IVE TRIED NOW FOR 3 HOURS NO MATTER WHAT I DO I CANT FIX IT.

NotYouMod
§
Veröffentlicht: 07.08.2023

You probably forgot to put this

// ==/UserScript==

at the end of script meta block.

§
Veröffentlicht: 07.08.2023

You probably forgot to put this

// ==/UserScript==

at the end of script meta block.

NO heres the first few lines


// ==UserScript==
// @name YouTube Custom Country Code
// @version 0.1
// @description Custom country code on YouTube
// @author donotprikel231
// @license MIT
// @match https://www.youtube.com/*
// @grant none
// @namespace http://tampermonkey.net/
// ==/UserScript==


I still get the ERROR

NotYouMod
§
Veröffentlicht: 07.08.2023

Try this:

// ==UserScript==
// @name YouTube Custom Country Code
// @version 0.1
// @description Custom country code on YouTube
// @author donotprikel231
// @license MIT
// @match https://www.youtube.com/*
// @grant none
// @namespace http://tampermonkey.net/
// ==/UserScript==

(function() {
  const yourCountryCode = 'Hi!';
  const countryCode = document.getElementById('country-code');

  if (countryCode && yourCountryCode) {
    countryCode.textContent = yourCountryCode;
  }
})()
§
Veröffentlicht: 07.08.2023

Try this:

// ==UserScript==
// @name YouTube Custom Country Code
// @version 0.1
// @description Custom country code on YouTube
// @author donotprikel231
// @license MIT
// @match https://www.youtube.com/*
// @grant none
// @namespace http://tampermonkey.net/
// ==/UserScript==

(function() {
  const yourCountryCode = 'Hi!';
  const countryCode = document.getElementById('country-code');

  if (countryCode && yourCountryCode) {
    countryCode.textContent = yourCountryCode;
  }
})()

NO not working

§
Veröffentlicht: 08.08.2023

Try this:

// ==UserScript==
// @name YouTube Custom Country Code
// @version 0.1
// @description Custom country code on YouTube
// @author donotprikel231
// @license MIT
// @match https://www.youtube.com/*
// @grant none
// @namespace http://tampermonkey.net/
// ==/UserScript==

(function() {
  const yourCountryCode = 'Hi!';
  const countryCode = document.getElementById('country-code');

  if (countryCode && yourCountryCode) {
    countryCode.textContent = yourCountryCode;
  }
})()

Nevermind i got it to work

Antwort schreiben

Anmelden um eine Antwort zu senden.