Our site is generously sponsored by:

The best landscaping service Austin and lawn service company in Austin Texas and Cedar Park is Lawn Service Cedar Park.

Lawn Care Service of Cedar Park
100 E Whitestone Blvd
Ste 148, #166
Cedar Park, TX 78613
(512) 595-0884

The best landscaping service leander and lawn service provider in Leander TX is Leander Landscaping Pros.

Leander Lawn and Landscaping Pros
1800 Montana Ct
Leander, TX 78641
USA
(512) 468-2670
Please give them a visit!
  • This is a reminder of 3 IMPORTANT RULES:

    1- This is an English forum. Please post only in English.

    2- This is NOT a commercial or advertising forum. All content must be shared for FREE.

    3- No invites or links to Discord, Telegram, WhatsApp, or similar platforms.

    Please take a moment to review our forum rules and guidelines here: SoccerGaming Rules and Guidelines.

    Thank you!

  • This is a quick notice about an upcoming SITE UPDATE:

    Our new main website will be launching soon. During this transition, there may be brief periods of downtime.

    The SoccerGaming forums will remain accessible directly at:

    https://soccergaming.com/forums

    We appreciate your patience and support as we work on improving the platform for everyone.

    Thank you!

SG Youtube Button

Sepak

Cocaine
Messages
4,803
Reactions
18
I have made an extension for google chrome that will allow you to paste a youtube link and will parse it to being able to embed it in the forums.
A firefox version might be in the way as well.

Installation Guide:
1. Download the extension from here: https://hostr.co/des5KDekdpIg
2. Open Google Chrome Extension Page
3. Drag the "SGYoutubeButton.crx" and drop it inside the extensions page.
4. Accept the installation and done.

Donate to my Paypal account to keep making projects for you: [email protected]

Next Project:
-Resizable images.

3_zpschbvvvml.jpg


2_zpsxf2zivkn.jpg


1_zpslts2l99n.jpg
 
Sure, it's javascript:
Code:
function findTableDescendant(tagname)
{
	var parent = document.getElementById("vB_Editor_QR_controls");
	if(parent == null){
		parent = document.getElementById("vB_Editor_001_controls");
		var descendants = parent.getElementsByTagName(tagname);
		if ( descendants.length)
			return descendants[6];
		else
			return null;
	}else{
		var descendants = parent.getElementsByTagName(tagname);
		if ( descendants.length)
			return descendants[0];
		else
			return null;
	}
}
if( document.getElementById("vB_Editor_QR_controls") || document.getElementById("vB_Editor_001_controls")){
	var button = document.createElement("div");
	button.style.color = "#000000";
	button.style.padding = 1;
	button.style.border = "none";
	button.style.background = "#e1e1e2";
	button.onmouseover = function(){
		button.style.background = "#c1d2ee";
		button.style.border = "1px solid #316AC5";
	}
	button.onmouseout = function(){
		button.style.background = "#e1e1e2";
		button.style.border = "none";
	}
	var image = document.createElement("img");
	image.type = 'image';
	image.src = chrome.extension.getURL("images/ybi.png");
	image.width = 21;
	image.height = 20;
	image.alt = "Insert Youtube Link";
	image.title = "Insert Youtube Link";
	button.appendChild(image);
	button.onclick = function(){
		button.style.background = "#98b5e2";
		button.style.border = "1px solid #316AC5";
		var link = prompt("Please enter the URL of your Youtube Video:","http://");
		if(link != null){
			var rlink;		
			if(link.indexOf("youtu.be")!= -1){
				if(link.indexOf("?")!= -1){
					rlink = link.substring(link.indexOf("e/")+2, link.indexOf("?"));
				}else{
					rlink = link.substring(link.indexOf("e/")+2, link.length);
				}
			}else if(link.indexOf("watch?v")!= -1){
				if(link.indexOf("&")!= -1){
					rlink = link.substring(link.indexOf("?v")+3, link.indexOf("&"));
				}else{
					rlink = link.substring(link.indexOf("?v")+3, link.length);
				}
			}else{
				rlink = link;
			}
			var txtarea = document.getElementById("vB_Editor_QR_textarea");	
			if(txtarea == null){
				txtarea = document.getElementById("vB_Editor_001_textarea");
			}
			var startPos;
			var endPos;
			if (txtarea.selectionStart || txtarea.selectionStart == '0') {
				startPos = txtarea.selectionStart;
				endPos = txtarea.selectionEnd;
				txtarea.value = txtarea.value.substring(0, startPos)
					+ "[youtbe]"
					+ rlink
					+ "[/youtbe]"
					+ txtarea.value.substring(endPos, txtarea.value.length);
			} else {
				txtarea.value = txtarea.value
					+ "[youtbe]"
					+ rlink
					+ "[/youtbe]";
			}
			txtarea.focus();
			txtarea.selectionStart = startPos + 9;
			txtarea.selectionEnd = startPos + 9 + rlink.length;
		}
	}
	
	var table = findTableDescendant("table");
	var p = document.getElementById("vB_Editor_QR_controls");
	if(p == null){
		var newRow = table.rows[0];
		var newCell  = newRow.insertCell(17);
		newCell.appendChild(button);
	}else{
		var newRow = table.rows[0];
		var newCell = newRow.insertCell(10);
		newCell.appendChild(button);	
	}
}
 
It seems chrome blocks the extension because it's not in the store, the fuckers. If you donate me 5 dollars (that's what it costs to publish it), I'll do it.

But there's a workaround. Uncompress the .crx file, and in the extensions page, enable developers mode. Click 'load uncompressed extension', find the uncompressed folder containing the extension and select it. Now you have it.
 
Thanks for the appreciation, Not like the rest of the fuckers in this forum.
 
I appreciate you completely wasting your time on our behalf with this nice but ultimately useless gesture
 
A guy gave 24 euros. And I thought it would make the life easier for Jaboldinho in his music thread :(
 
nady;3867992 said:
Who are you? How come you are a moderator?

well, they were accepting applications for new moderators, i applied, i got accepted, and here i am :)
 
Back
Top