top of page
hb_2
Watch Now
hb_week2: Video Player

MY BOOKMARKLET

This week's task is to write my own bookmarklet. I want to try to make a spoof bookmarklet. I am a fan of the Korean group blackpink, so I plan to make people click the bookmark, the source website will become a fan website, and the hyperlinks on the website will also become random links about the group.

​

Here are my Js code:

​

$("p").mouseenter(function(){
var link=['//www.facebook.com/BLACKPINKOFFICIAL/','//www.youtube.com/channel/UCOmHUn--16B90oW2L6FRR3A',
'//time.com/collection/time-100-next-2019/5718842/blackpink/',
'//www.google.com/search?q=blackpink&rlz=1C5CHFA_enUS887US887&tbm=isch&source=lnms&sa=X&ved=0ahUKEwjUnqbt0sLnAhUu1VkKHUiYCpQQ_AUIDCgD&biw=1281&bih=882&dpr=2','//www.billboard.com/music/blackpink',
'//footwearnews.com/2019/fashion/celebrity-style/blackpink-best-fashion-style-1202892967/']
var index=Math.floor((Math.random()*link.length));
  $("h1").text("BlackPink Fan Club")
   $("h1").css("background-color","pink")
  $("body").css("background-color","black")
  $("p").css("background-color","pink");

  $("a").text('love BlackPink !!!');
  $("a").css("color","pink");
  $("a").css("font-size","200%");

  $("a").attr("href",link[index]);


});
$("p").mouseleave(function(){
  $("p").css("background-color","black");
    $("p").css("color","black");
  $("p").css("color","pink");
  $("p").text('BlackPink, Can U hear Ya?')
    $("a").attr("href",link[index]);
});

(function(){
    var m;
    m = $("<div style='position: absolute;' id='movePic'><img src='https://www.freepnglogos.com/uploads/blackpink-logo/blackpink-transparent-logo-blackpink-fdpink-sticker-0.png' height='80px' width='120px'>");
    $("body").after(m);
    $("body").mousemove(function (e) {
        m.css("left", e.pageX + 5);
        m.css("top", e.pageY + 5);
    });
    $("body").hover(function () {
        m.show();
    }, function () {
        m.hide();
    });
})()

​

​

hb_week2: 內嵌

Tool:

I use Visual Studio Code to write Js first ,and then i use Bookmarkleter to transfer.

​

The code after transfer:

​

javascript:void function(){$("p").mouseenter(function(){var a=["//www.facebook.com/BLACKPINKOFFICIAL/","//www.youtube.com/channel/UCOmHUn--16B90oW2L6FRR3A","//time.com/collection/time-100-next-2019/5718842/blackpink/","//www.google.com/search%3Fq=blackpink%26rlz=1C5CHFA_enUS887US887%26tbm=isch%26source=lnms%26sa=X%26ved=0ahUKEwjUnqbt0sLnAhUu1VkKHUiYCpQQ_AUIDCgD%26biw=1281%26bih=882%26dpr=2","//www.billboard.com/music/blackpink","//footwearnews.com/2019/fashion/celebrity-style/blackpink-best-fashion-style-1202892967/"],b=Math.floor(Math.random()*a.length);$("h1").text("BlackPink Fan Club"),$("h1").css("background-color","pink"),$("body").css("background-color","black"),$("p").css("background-color","pink"),$("a").text("love BlackPink !!!"),$("a").css("color","pink"),$("a").css("font-size","200%25"),$("a").attr("href",a[b])}),$("p").mouseleave(function(){$("p").css("background-color","black"),$("p").css("color","black"),$("p").css("color","pink"),$("p").text("BlackPink, Can U hear Ya%3F"),$("a").attr("href",link[index])}),function(){var a;a=$("<div style='position: absolute;' id='movePic'><img src='https://www.freepnglogos.com/uploads/blackpink-logo/blackpink-transparent-logo-blackpink-fdpink-sticker-0.png' height='80px' width='120px'>"),$("body").after(a),$("body").mousemove(function(b){a.css("left",b.pageX+5),a.css("top",b.pageY+5)}),$("body").hover(function(){a.show()},function(){a.hide()})}()}();

​

hb_week2: 內嵌

©2020 by Siyuan Zan.

bottom of page