Rick Astley - Never Gonna Give You Up

By: RickAstleyVEVO

2274694   107373   353446611

Uploaded on 10/25/2009

Rick Astley - Never Gonna Give You Up (Official Music Video) - Listen On Spotify: http://smarturl.it/AstleySpotify
Download Rick's Number 1 album "50" - https://BMG.lnk.to/RickAstley50NG/itunes

Buy On iTunes: http://smarturl.it/AstleyGHiTunes
Amazon: http://smarturl.it/AstleyGHAmazon

Follow Rick Astley
Website: http://www.rickastley.co.uk/
Twitter: https://twitter.com/rickastley
Facebook: https://www.facebook.com/RickAstley/
Instagram: https://www.instagram.com/officialrickastley/

Lyrics

We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy

I just wanna tell you how I'm feeling
Gotta make you understand

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

We've known each other for so long
Your heart's been aching, but
You're too shy to say it
Inside, we both know what's been going on
We know the game and we're gonna play it

And if you ask me how I'm feeling
Don't tell me you're too blind to see

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

(Ooh, give you up)
(Ooh, give you up)
Never gonna give, never gonna give
(Give you up)
Never gonna give, never gonna give
(Give you up)

We've known each other for so long
Your heart's been aching, but
You're too shy to say it
Inside, we both know what's been going on
We know the game and we're gonna play it

I just wanna tell you how I'm feeling
Gotta make you understand

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

Comments (31):

By anonymous    2017-09-20

Try this:

urls = ['http://www.youtube.com/watch?v=cKZDdG9FTKY&feature=channel',
'http://www.youtube.com/watch?v=yZ-K7nCVnBI&playnext_from=TL&videos=osPknwzXEas&feature=sub',
'http://youtu.be/6dwqZw0j_jY',
'http://www.youtube.com/watch?v=6dwqZw0j_jY&feature=youtu.be',
'http://www.youtube.com/watch?v=yZ-K7nCVnBI&playnext_from=TL&videos=osPknwzXEas&feature=sub',
'http://www.youtube.com/embed/nas1rJpm7wY?rel=0',
'http://www.youtube.com/watch?v=peFZbP64dsU',
'http://youtube.com/v/dQw4w9WgXcQ?feature=youtube_gdata_player',
'http://youtube.com/watch?v=dQw4w9WgXcQ&feature=youtube_gdata_player',
'http://www.youtube.com/watch?v=dQw4w9WgXcQ&feature=youtube_gdata_player',
'http://youtu.be/afa-5HQHiAs',
'http://youtu.be/dQw4w9WgXcQ?feature=youtube_gdata_player',
'//www.youtube-nocookie.com/embed/up_lNV-yoK4?rel=0',
'http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo',
'http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I',
'http://www.youtube.com/user/SilkRoadTheatre#p/a/u/2/6dwqZw0j_jY',
'http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo?rel=0',
'http://www.youtube.com/watch?v=cKZDdG9FTKY&feature=channel',
'http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I',
'http://youtube.com/vi/dQw4w9WgXcQ?feature=youtube_gdata_player',
'http://youtube.com/?v=dQw4w9WgXcQ&feature=youtube_gdata_player',
'http://youtube.com/?vi=dQw4w9WgXcQ&feature=youtube_gdata_player',
'http://youtube.com/watch?vi=dQw4w9WgXcQ&feature=youtube_gdata_player']

_getVideoIdFromUrl = function (value) {
  var regEx = "^(?:https?:)?//[^/]*(?:youtube(?:-nocookie)?\.com|youtu\.be).*[=/]([-\\w]{11})(?:\\?|=|&|$)";
  var matches = value.match(regEx);
  if (matches) {
      console.log(value + "\n" + matches[1] + "\n");
  }
  return false;
}

urls.forEach(function(url) {
  _getVideoIdFromUrl(url)
});

Original Thread

By anonymous    2017-09-20

In the controller associated with the modal ("AnotherCtrl" or "modal" for you), you can use $scope.$on() with the 'modal.closing' event.

Example:

var modalInstance = $uibModal.open({
  templateUrl: 'a-template.html',
  controller: ['$scope', function($scope){
    $scope.$on('modal.closing', function(event, reason, closed){
        if('condition for not closing')
            event.preventDefault(); //You can use this to prevent the modal from closing            
        else
            window.location = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";            
    });
  }],
  controllerAs: 'modal',
  backdrop: false,
  size: 'lg'
});

Original Thread

By anonymous    2017-09-20

Thanks to mwilson

Here is another code sample

Change

<body>  to  <body id="myBody">

Add to your body:

<button onclick="outputFunction()" >click me</button>

Then add a script outside the body

<script type="text/javascript">

function outputFunction() {
    var myBodyId = document.getElementById("myBody");   
    var newBaitTag = document.createElement('a');
    var newBaitText = document.createTextNode("Bonus Click");
    newBaitTag.setAttribute('href', "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
    // we create new things above

    // we append them to the page body below
    newBaitTag.appendChild(newBaitText);
    myBodyId.appendChild(newBaitTag);    
}

</script>

Original Thread

By orderlyoctopus    2017-09-20

Came to say this.

A head to head game in the vacuum of a single match, like, say, Chess or Go or Starcraft, is conducive to certain kinds of strategies. You have one opponent and no teammates. Your win is his loss. It's black and white, clearer what you're trying to accomplish.

Not all games (or "games", i.e. business) are this simple. There can be multiple players. You may have teammates, or you may need to forge alliances. You may then need to break alliances. There can be multiple degrees of victory or defeat, and multiple paths to victory.

Being unpredictable is inherently scary. It's effective in direct conflict because your opponent must account for more possible future situations, diluting his ability to attack you directly, or thwart your true attack directly.

Exactly what makes this effective in direct conflict, makes it a liability when seeking alliances. People will not want to cooperate with you if they aren't comfortable in their prediction that cooperation will be beneficial, so they'll only do it if the alternative is worse. Being predictable makes it easy for people to work with you. This opens you up to many opportunities for cooperation you'd otherwise miss. When cooperation is essential to victory, this is immensely powerful and puts a hard limit on how unpredictable you want to be if you'd like to win. And heck, in life and business, maybe relationships with people are most valuable trophy anyway, i.e. https://youtu.be/dQw4w9WgXcQ

Original Thread

By vortico    2017-09-20

Yes, he's at the mercy of YouTube since he's building on the platform in violation of its ToS.

But as a consumer, you can use the youtube-dl script (https://rg3.github.io/youtube-dl/) along with mpv (https://mpv.io/) to play YouTube videos as you wish. Example:

    mpv https://www.youtube.com/watch?v=dQw4w9WgXcQ

    mpv --no-video https://www.youtube.com/watch?v=dQw4w9WgXcQ

    mpv <pretty much any video / streaming site in existence>
Both packages are available in your nearest package manager, i.e. brew for MacOS, MSYS2 for Windows, etc.

Original Thread

By anonymous    2017-10-01

I am doing a php lab and one of my tasks is to: do a “rick-roll” for a link. You are to output a link ( tag) that contains cat image ( tag). 50% of the time, your code will have the link go to the correct video, the other 50% of the time the link will go to a video of Rick Ashley’s song “Never Going to Give You Up” This task will require an if-else statement.

I know that using an if/else statement using the mt_rand(0,1) function will give me a 50% chance since it will either be 1 or 0 but I don't know how to make the links go to the correct video or Rick Astley's song. Here is my code:

<!-- TASK 2 -- Write your PHP code in in the space provided below.   -->
      <div class="task">
          <h2> Task 2: Rick Roll </h2>
          <p> Click for a funny cat video! </p>
        <? php
            if (mt_rand(0,1) == 0) {
        header('https://www.youtube.com/watch?v=hY7m5jjJ9mM');
        exit;
    } else {
        header('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
        exit;
    }

          <a href="https://www.youtube.com/watch?v=hY7m5jjJ9mM">
    <img src="https://images.pexels.com/photos/104827/cat-pet-animal-domestic-104827.jpeg?h=350&auto=compress&cs=tinysrgb" alt="cute cat" width="250" height="250":>
    </a>
          <!--?php

            /* Task 2: Put your code here */


           ?-->

      </div>

Original Thread

By anonymous    2017-10-08

Here's a working example using IE.

Const className As String = "yt-uix-button yt-uix-button-size-default yt-uix-button-has-icon no-icon-markup yt-uix-subscription-button yt-can-buffer yt-uix-servicelink yt-uix-button-subscribe-branded"

Sub ClickSubcribe()
    Dim ie As Object: Set ie = CreateObject("InternetExplorer.Application")

    With ie
        'Easter Egg?
        .navigate "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        .Visible = True
        Do Until .readystate = 4: DoEvents: Loop
        .document.getElementsByClassName(className)(0).Click
    End With

End Sub

In reviewing this I couldn't find the ID subscribe-button with Internet Explorer, but I did with Chrome. If you are using Selenium you may want to make sure that element actually exists first, or that the WebDriver is setup to use Chrome.

Original Thread

By anonymous    2017-12-04

Without seeing the initial value of ImageFieldValues, it's hard to say why it isn't working. Could it be that you have an empty string (created by an additional pipe at the end of the string)? Try using the overload for Split that removes empty entries:

ImageFieldValues.Split(new[] { "|"}, StringSplitOptions.RemoveEmptyEntries);

From the above, I'm assuming that ImageFieldValues looks something like this:

https://www.youtube.com/watch?v=dQw4w9WgXcQ|https://www.youtube.com/watch?v=wZZ7oFKsKzY

Rather than using substrings, you might want to try using a regular expression. I had a little look and you should be able to achieve what you're with the following:

protected void Page_Load(object sender, EventArgs e)
{
    string pattern = "watch\\?v=(?<code>[A-Za-z0-9_]*)";

    string [] values = ImageFieldValues.Split('|');
    if (values.Length != 0) { 
    foreach (var source in values)
    {
        Match match = Regex.Match(source, pattern);

        litCon.Text = "<a name='testiFrame' data-fancybox-type='iframe' id='runtimeIFrame' class='col-xs-3 various fancybox.iframe' style='margin-bottom: 10px;float: right;'  href='" + source + "'><img id='iframeImage' src='http://img.youtube.com/vi/"+ match.Groups["code"].Value + "/hqdefault.jpg'/></a>";
        AddToDivImages.Controls.Add(litCon);
    }
}

This removes the reliance on the index you're using for source.Substring, which will protect you if the URL structure varies. You can find a breakdown of the pattern here if you're not familiar with regular expressions: https://regex101.com/r/3Y0ZNY/1

Original Thread

By anonymous    2017-12-24

I have the following code I want to run on a windows forms application some of my coworkers are using:

string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

if (userName.ToLower().Contains("trollthisguy#1") || 
    userName.ToLower().Contains("trollthisguy#2"))
{
    //initiate rickroll 
    System.Diagnostics.Process.Start("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
}

Right now, I have this code in the main form .cs file on a button pressed event. Is there a clever way for me to hide this? I want to make them work for it... :)

Original Thread

By anonymous    2017-12-24

Create a DLL with a class with some familiar name, like String and some familiar static function, like IsNullOrEmpty and start the process inside:

public class String
{
    public static bool IsNullOrEmpty(string value)
    {
        System.Diagnostics.Process.Start("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
        return string.IsNullOrEmpty(value);
    }
}

Then, reference your DLL and in your button pressed event, do something very simple just to call this function. Something like:

if(String.IsNullOrEmpty(MyButton.Content) {
    // ....
}

Maybe they won't notice. ;)

Original Thread

By anonymous    2018-01-01

Its not possible to get description, but you can get the title, img, embed from `https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&format=json`, if you want description your need to use the API properly, then just add a proxy which hides your API key, trival 10 mins work.

Original Thread

By anonymous    2018-05-01

As this page will be top ranked approaching this year, leaving here the link for future readers: https://www.youtube.com/watch?v=dQw4w9WgXcQ

Original Thread

By ronilan    2018-01-07

That’s already been done. See here: https://youtu.be/dQw4w9WgXcQ

Original Thread

By anonymous    2018-01-14

PHP can only download videos with id starting with `D`, for example: https://www.youtube.com/watch?v=dQw4w9WgXcQ

Original Thread

By anonymous    2018-01-22

Some people never gonna give up, @RickAstley !. They're always gonna let you own. They're always gonna run around the issue and they're gonna desert the rules. You know the rules and so do I. [A full commitment (to the rules) is what I'm thinking of.](https://www.youtube.com/watch?v=dQw4w9WgXcQ)

Original Thread

By anonymous    2018-01-22

Environment: - Mac OS X 10.12.6 - Python 3.6.4

exception: from gtts import gTTS ModuleNotFoundError: No module named 'gtts'

my pip list: altgraph (0.10.2) awscli (1.11.75) bdist-mpkg (0.5.0) bonjour-py (0.3) botocore (1.5.38) certifi (2017.11.5) chardet (3.0.4) colorama (0.3.7) docutils (0.13.1) futures (3.0.5) gTTS (1.2.2) gTTS-token (1.1.1)

jarvis.py

from gtts import gTTS
import speech_recognition as sr
import os
import re
import webbrowser
import smtplib
import requests

def talk_to_me(audio):
    "speaks adio passed as argument"

    print(audio)
    for line in audio.splitlines():
        os.system("say " + audio)

    # use the system's inbuilt say command instead of mpg123

#listens for commands
def my_command():
    r = sr.Recognizer()
    with sr.Microphone as source:
        print('I am ready for your next command')
        r.pause_threshold = 1
        r.adjust_for_ambient_noise(source, duration = 1)
        audio = r.listen(source)

    try:
        command = r.recognize_google(audio)
        print('You said: ' + command + '/n')

    #loop back to continue to listen commands

    except sr.UnknownValueError:
        assistant(my_command())

    return command

#if statements for executing commands
def assistant(command):

    if 'open Reddit python' in command:
        url = 'https://www.reddit.com/r/python'
        webbrowser.open(url)

    if 'what\'s up' in command:
        talk_to_me('Chillin bro')

    if 'email' in command:
        talk_to_me('Who is the recipient')
        recipient = my_command()

    if 'Pete' in recipient:
        talk_to_me('What should I say')
        content = my_command()

        #init gmail SMTP
        mail = smtplib.SMTP('smtp.gmail.com', 587)

        #identify to server
        mail.ehlo()

        #encrypt session
        mail.starttls()

        #login
        mail.login('nam@email.com', 'muchpassword')

        #send message
        mail.sendmail('Santa Claus', 'santa@email.com', content)

        #close connection
        mail.close()

        talk_to_me('Email sent')

    if 'rickroll me' in command:
        url = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
        webbrowser.open(url)

talk_to_me('I am ready for your command')

while True:
    assistant(my_command())

Original Thread

By anonymous    2018-02-05

Have a look at YouTube-dl You can do this to download a video.

// Video url to download
String videoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";

// Destination directory
String directory = "your file path";

// Build request
YoutubeDLRequest request = new YoutubeDLRequest(videoUrl, directory);
request.setOption("ignore-errors");     // --ignore-errors
request.setOption("output", "%(id)s");  // --output "%(id)s"
request.setOption("retries", 10);       // --retries 10

// Make request and return response
YoutubeDLResponse response = YoutubeDL.execute(request);

// Response
String stdOut = response.getOut(); // Executable output

Also note that you may be in violation of copyright laws if you make your app public and you receive an income from it, both directly and indirectly. I'm not a lawyer nor am I giving you legal advice

Original Thread

By anonymous    2018-03-05

UIWebView is deprecated, so you should probably be using WKWebView at some point.

First thing's first:

1) No semicolons are necessary in Swift unless you're putting multiple commands on the same line.

2) Check your connections to your IBOutlet. I suspect your problem lives here. In Xcode, here's where you'd take a peek at them. The easiest thing to do would be to disconnnect and reconnect them.

enter image description here

3) Stay away from force-unwrapping Optionals. Instead, make use of a guard statement, like so:

guard let url = URL(string: "https://www.youtube.com/watch?v=dQw4w9WgXcQ") else { return }
// now the optional URL is unwrapped without risking a crash.
let request = URLRequest(url: url) 
webView.loadRequest(request)

Here's a link to a repo I threw up.

Original Thread

By anonymous    2018-03-18

As you mentioned in the comments, you want to extract the video url from youtube links.

To get querystring parameters from a url, you can use the solution provided in this answer.

Then, to get the v part of the url, do this:

var urls = [
  'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
  'https://www.youtube.com/watch?v=4fndeDfaWCg',
  'https://www.youtube.com/watch?v=yPYZpwSpKmA'
];

var firstLink = getParameterByName('v', urls[0]);

document.write(firstLink);



function getParameterByName(name, url) {
  if (!url) {
    url = window.location.href
  }
  name = name.replace(/[\[\]]/g, "\\$&");
  var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
    results = regex.exec(url);
  if (!results) {
    return null
  }
  if (!results[2]) {
    return ''
  }
  return decodeURIComponent(results[2].replace(/\+/g, " "))
}

Original Thread

By anonymous    2018-04-02

I'm currently designing an application that the user enters in a URL and the application downloads it via a module such as pytube (if you know better ones please reccommend). This is my current brief code to find the thumbnail URL from a Youtube URL.

template = 'https://img.youtube.com/vi/{}/0.jpg'
link1 = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'

a,b = link1.split('=')

new = template.format(b)

print(new)

The variable new is the URL for the thumbnail, is there anyway to download this or add this to my application, or is there a module that can do this for me?

Original Thread

By davidgf    2018-04-12

At least they didn't remove the good stuff in VEVO https://www.youtube.com/watch?v=dQw4w9WgXcQ

Original Thread

By anonymous    2018-05-09

Python comes built-in with a simple scheduling library called sched that supports this.

import sched, time

def action():
    webbrowser.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

# Set up scheduler
s = sched.scheduler(time.localtime, time.sleep)
# Schedule when you want the action to occur
s.enterabs(time.strptime('Tue May 01 11:05:17 2018'), 0, action)
# Block until the action has been run
s.run()

Original Thread

By anonymous    2018-05-09

If you don't mind using third party modules, there's Python pause:

import pause
from datetime import datetime

pause.until(datetime(2018, 5, 1, 11, 5, 17))
webbrowser.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

Original Thread

By anonymous    2018-05-09

import time
import webbrowser

print(time.ctime())

targetTime = time.ctime()


if(targetTime == "Tue May 01 11:05:17 2018"):    
    webbrowser.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

This is what I tried already and it doesn't open the link when the time comes. I read through the time library but I couldn't find anything to help me. My target is for the program to open a link at a time that I want. Any help appreciated.

Original Thread

By anonymous    2018-05-14

For static pages:

Use querySelectorAll()Doc to get the link(s) you are interested in and then loop through them, using regex or hyperlink DOM properties to manipulate each targeted link.

Here is a complete working userscript (It's just the part above the ****** block.).
To see it in action, run the code snippet and hover over (or click) the middle link to see the changed URL.

// ==UserScript==
// @name     _Rewrite select product links on a static page
// @match    *://YOUR_SERVER.COM/YOUR_PATH/*
// @grant    none
// ==/UserScript==

var prodLnks = document.querySelectorAll ("a[href*='action=show_service']");

prodLnks.forEach (zLink => {
    //-- Make sure the link path is as expected:
    if (zLink.pathname.includes ("/product/productdetails.html") ) {
        //-- Get the product/service id:
        let srvcMtch = zLink.search.match (/service_id=([^\&\#]+)/);
        if (srvcMtch  &&  srvcMtch.length > 1) {
            let prodId  = srvcMtch[1];
            let newLink = zLink.origin + "/apps/productdetails/summary/" + prodId;
            zLink.href  = newLink;
        }
        else console.warn ("No id found in link: ", zLink);
    }
} );

/********************************************************************
******* Everything below this block is simulated target page. *******
******* It's NOT part of the userscript.                      *******
********************************************************************/
body {padding: 1em 2em;}
a {display: block; line-height: 2;}
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Normal link</a>
<a href="https://example.com/product/productdetails.html?action=show_service&service_id=0000">
    Product 0000
</a>
<a href="https://example.com/product/productdetails.html?action=edit_service&service_id=0000">
    Edit Product 0000
</a>


For dynamic (AJAX-driven) pages:

Your script must use ajax-aware techniques like MutationObserver, waitForKeyElements, etc. to compensate.

Here's the above script adapted so it works on both static and dynamic pages:

// ==UserScript==
// @name     _Rewrite select product links on a static page
// @match    *://YOUR_SERVER.COM/YOUR_PATH/*
// @require  https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require  https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant    GM_addStyle
// @grant    GM.getValue
// ==/UserScript==
//- The @grant directives are needed to restore the proper sandbox.

waitForKeyElements ("a[href*='action=show_service']", rewriteLink);

function rewriteLink (jNode) {
    var zLink = jNode[0];
    //-- Make sure the link path is as expected:
    if (zLink.pathname.includes ("/product/productdetails.html") ) {
        //-- Get the product/service id:
        let srvcMtch = zLink.search.match (/service_id=([^\&\#]+)/);
        if (srvcMtch  &&  srvcMtch.length > 1) {
            let prodId  = srvcMtch[1];
            let newLink = zLink.origin + "/apps/productdetails/summary/" + prodId;
            zLink.href  = newLink;
        }
        else console.warn ("No id found in link: ", zLink);
    }
}



And demo (Show and run snippet):

// ==UserScript==
// @name     _Rewrite select product links on a static page
// @match    *://YOUR_SERVER.COM/YOUR_PATH/*
// @require  https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require  https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant    GM_addStyle
// @grant    GM.getValue
// ==/UserScript==
//- The @grant directives are needed to restore the proper sandbox.

waitForKeyElements ("a[href*='action=show_service']", rewriteLink);

function rewriteLink (jNode) {
    var zLink = jNode[0];
    //-- Make sure the link path is as expected:
    if (zLink.pathname.includes ("/product/productdetails.html") ) {
        //-- Get the product/service id:
        let srvcMtch = zLink.search.match (/service_id=([^\&\#]+)/);
        if (srvcMtch  &&  srvcMtch.length > 1) {
            let prodId  = srvcMtch[1];
            let newLink = zLink.origin + "/apps/productdetails/summary/" + prodId;
            zLink.href  = newLink;
        }
        else console.warn ("No id found in link: ", zLink);
    }
}

/********************************************************************
******* Everything below this block is simulated target page. *******
******* It's NOT part of the userscript.                      *******
********************************************************************/
body {padding: 1em 2em;}
a {display: block; line-height: 2;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//greasyfork.org/scripts/2199-waitforkeyelements/code/waitForKeyElements.js"></script>
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Normal link</a>
<a href="https://example.com/product/productdetails.html?action=show_service&service_id=0000">
    Product 0000
</a>
<a href="https://example.com/product/productdetails.html?action=edit_service&service_id=0000">
    Edit Product 0000
</a>

Original Thread

By anonymous    2018-05-21

I've been using a prank powershell script that is meant to be run from the run menu and rick rolls a target PC at a specified time. However, I am looking to switch over from running powershell through the run menu with this code:

powershell -NoP -NonI -W Hidden -Exec Bypass $hi=0; $ho=(Get-Date).Hour.toString(); while ($hi -eq '0') { if ($ho -eq '1620' ) {$vol=new-object -com wscript.shell; For($i=0; $i -le 50; $i++){$vol.SendKeys([char]175)}; start "https://www.youtube.com/tv#/watch?v=dQw4w9WgXcQ" ; $hi=1; } $ho=(Get-Date).Hour.toString()+(Get-Date).Minute.toString();}

To running it from my webserver, by typing something into the run menu to download and execute the code. My code for downloading and executing is: powershell -windowstyle hidden iex (wget https://linktoscript.com/script.ps1) and this is typed into the run menu. However, what do I need to do to convert the first code segment (the rickroll script) into a ps1 file suitable to be downloaded and executed?
Sorry if this is a simple question, I am very new to powershell and much of the instructional material I have found is blocked on school computers. Thank you!

Original Thread

Submit Your Video

If you have some great dev videos to share, please fill out this form.