JQuery only append to child

0 votes

Please help me to understand why it's doing that :o

// ==UserScript==
// @name        GMod Cinema Porn
// @namespace   Bluscream
// @version     1.0
// @description H3H3
// @author      Bluscream
// @include     https://www.youtube.com/embed/OiMTuwS3xvg*
// @include     http://cinema.pixeltailgames.com/search.html
// @include     *
// @grant       unsafeWindow
// @grant       GM_xmlhttpRequest
// @require     https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js
// @run-at      document-end
// ==/UserScript==
(function() {
    'use strict';
    if (window.location.href.startsWith("https://www.youtube.com/embed/OiMTuwS3xvg")) {
        window.location.href = "http://embed.redtube.com/player/?id=42019&autostart=true";
    } else if (window.location.href == "http://cinema.pixeltailgames.com/search.html"){
        $ = jQuery || $;
        $( document ).ready(function() {
            temop = $('#content-container').children('div[style="text-align:center;font-size:0;"]:first');
            temop.append('<service>').css('background-image', 'url("http://cdn1-www.craveonline.com/assets/uploads/2013/12/man_file_1048340_youporn-icon.png")').click(function () {
                window.selectService("YouPorn", "http:\/\/www.youporn.com");
            }).hover(function () {
                window.hoverService();
            });
        });
        //$('#content-container>div[style="text-align:center;font-size:0;"]').append('<service style=\'background-image:url(\"logos\/youtube.png\")\' onclick=\'selectService(\"YouTube\",\"http:\/\/www.youtube.com\")\' onmouseover="hoverService()">-</service>');
    }
})();

Jul 19 in Web Development by gaurav
• 17,000 points
3 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

0 votes
1 answer

How to download a file by jQuery.Ajax?

Hello @kartik, You don't need to do this ...READ MORE

answered Sep 18, 2020 in Web Development by Niroj
• 82,740 points
5,588 views
0 votes
1 answer

How to place images using jQuery masonry plugin to start

You were just missing a css class that adjusts ...READ MORE

answered Jun 22 in Web Development by rajatha
• 7,040 points
8 views
0 votes
1 answer

How to use JQuery with ReactJS

Yes, we can use jQuery in ReactJs. ...READ MORE

answered Jun 22 in Web Development by rajatha
• 7,040 points
8 views
0 votes
1 answer

Smooth scroll to div id jQuery

You need to animate the html, body $("#button").click(function() { ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,040 points
9 views
0 votes
1 answer

Using Jquery Ajax to retrieve data from Mysql

Perform a AJAX GET request to get ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,040 points
34 views
0 votes
1 answer

how to use substr() function in jquery?

To get substring of a string in ...READ MORE

answered Jun 27 in Web Development by rajatha
• 7,040 points
11 views
0 votes
1 answer

How to use jquery with asp.net ajax?

If you weren't aware, Microsoft is planning ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
186 views
0 votes
1 answer

Is 'sparkline' a method?

I suggest you to check 2 things That jquery.sparkline.js is actually ...READ MORE

answered Nov 9, 2018 in Apache Spark by Frankie
• 9,830 points
597 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,500 points
305 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19, 2020 in PHP by Niroj
• 82,740 points
279 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP