Jelajahi Sumber

First commit

dvemula 13 tahun lalu
melakukan
6c9d37a0b4
7 mengubah file dengan 45 tambahan dan 0 penghapusan
  1. 1 0
      README
  2. 27 0
      copylinkaddress.js
  3. TEMPAT SAMPAH
      icons/icon128.png
  4. TEMPAT SAMPAH
      icons/icon48.png
  5. 1 0
      icons/license.txt
  6. 1 0
      jquery-latest.min.js
  7. 15 0
      manifest.json

+ 1 - 0
README

@@ -0,0 +1 @@
+This file was created by JetBrains WebStorm 4.0.1 for binding GitHub repository

+ 27 - 0
copylinkaddress.js

@@ -0,0 +1,27 @@
+var linkAddress = $('<input id="copylAddress" type="text" />', { css: { 'display': 'none' }});
+$('body').append(linkAddress);
+
+//console.log("Copyl loaded!");
+
+$(function() {
+    $('a').on({
+        mouseenter: function() {
+            if(window.getSelection().rangeCount == 0) {
+                //console.log("Nothing is selected. Copyl kicks in.");
+                linkAddress.val($(this).prop('href'));
+                linkAddress.select();
+                //console.log(linkAddress.val());
+            } else {
+                console.log("Something is already selected. Copyl backs out.");
+            }
+        },
+        mouseleave: function() {
+            //console.log("Leaving link.");
+            if (linkAddress.val) {
+                linkAddress.val(null);
+                //console.log("Cleared Copyl");
+                window.getSelection().removeAllRanges();
+            }
+        }
+    });
+});

TEMPAT SAMPAH
icons/icon128.png


TEMPAT SAMPAH
icons/icon48.png


+ 1 - 0
icons/license.txt

@@ -0,0 +1 @@
+The icons are obtained from http://www.webdesignerdepot.com/2009/03/200-free-exclusive-icons-siena/ and are free for commerical use (when a link to the author's website is included).

File diff ditekan karena terlalu besar
+ 1 - 0
jquery-latest.min.js


+ 15 - 0
manifest.json

@@ -0,0 +1,15 @@
+{
+    "name": "Copy Link Address",
+    "version": "0.1",
+    "description": "Copy link address without right-clicking. Just hover the link hit Ctrl-C / Cmd-C!",
+    "content_scripts": [
+        {
+        "matches": ["<all_urls>"],
+        "js": ["jquery-latest.min.js", "copylinkaddress.js"]
+        }
+    ],
+    "icons": {
+            "48": "/icons/icon48.png",
+            "128": "/icons/icon128.png"
+        }
+}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini