Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
Agregar enlace de SocialBlade en el canal / página de YouTube

Cuando esté en YouTube, haga clic en el botón para buscar enlaces de canales en SocialBlade.

  1. Visite el canal de YouTube
  2. Botón de enlace inferior derecho
  3. Haga clic y se redirige en una nueva pestaña https://socialblade.com/youtube/c/***/videos/highestrated

Esto es lo que tengo hasta ahora, pero no aparece ningún botón en la esquina inferior derecha en el que pueda hacer clic para visitar las estadísticas de Socialblade.

 // ==UserScript== // @name YouTube to SocialBlade // @description When on YouTube click button to search for SocialBlade stats. // @namespace stackoverflow.com // @author stackoverflow.com // @license MIT // @include https://www.youtube.com/c/* // @include https://www.youtube.com/channel/* // @include https://www.youtube.com/user/* // @version 0.1 // @grant none // @icon https://www.google.com/s2/favicons?domain=socialblade.com // ==/UserScript== (function() { 'use strict'; getChannelId(); if (channelId) { let div = document.createElement('div'); div.innerHTML = '<a id="socialbladeSearchButton">SocialBlade</a>'; div.style.display = "inline-block"; div.style.position = "fixed"; div.style.right = "2%"; div.style.bottom = "2%"; div.style.zIndex = '9999'; document.body.append(div); let icon = document.getElementById('socialbladeSearchButton'); icon.style.background = 'white'; icon.style.color = 'blue'; icon.style.fontWeight = '800'; icon.style.padding = '5px'; icon.style.border = 'solid 2px black'; icon.style.textDecoration = 'none'; icon.style.fontSize = '14px'; icon.href = 'https://socialblade.com/youtube/channel/' + channelId; icon.target = '_blank'; } var channelId; function getChannelId() { let x = window.location.pathname; let arr = x.split('/'); for (let i = 0; i < arr.length; i++){ if (arr[i].substring(0,2) === 'channel' || arr[i].substring(0,2) === 'CHANNEL') { channelId = arr[i]; } } } })();

Creo que tengo problemas para entender la function getChannelId() { part. Hice esta pregunta en otro foro y alguien respondió

Llame a su función después de declarar la función. channelId es solo una cadena, no es verdadero o falso, y no está verificando nada, su condición if es muy incorrecta. ¿Por qué necesitarías una condición if para eso en primer lugar? Simplemente me desharía de él y de toda su función y bucle for.

Cualquier ayuda es apreciada, gracias!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!