diff --git a/extensions/LinkedIn.popclipextz b/extensions/LinkedIn.popclipextz index f3d266895..04b4493bc 100644 Binary files a/extensions/LinkedIn.popclipextz and b/extensions/LinkedIn.popclipextz differ diff --git a/lib/zod.js b/lib/zod.js deleted file mode 100644 index 0863f4a16..000000000 --- a/lib/zod.js +++ /dev/null @@ -1 +0,0 @@ -// This is a stub. The actual file is contained within PopClip itself. diff --git a/source/LinkedIn.popclipext/Config.js b/source/LinkedIn.popclipext/Config.js deleted file mode 100644 index f8a2c0b29..000000000 --- a/source/LinkedIn.popclipext/Config.js +++ /dev/null @@ -1,6 +0,0 @@ -define({ - identifier: "com.pilotmoon.popclip.extension.linkedin", - name: "LinkedIn", - icon: "in.png", - actions: require('linkedin.js'), -}); \ No newline at end of file diff --git a/source/LinkedIn.popclipext/Config.json b/source/LinkedIn.popclipext/Config.json new file mode 100644 index 000000000..508d56003 --- /dev/null +++ b/source/LinkedIn.popclipext/Config.json @@ -0,0 +1,9 @@ +{ + "identifier": "com.pilotmoon.popclip.extension.linkedin", + "name": "LinkedIn", + "icon": "in.png", + "regex": "(?s)^.{1,195}$", + "url": "https://www.linkedin.com/search/results/all/?keywords=***", + "popclipVersion": 4225, + "description": "Search for the selected name on LinkedIn." +} diff --git a/source/LinkedIn.popclipext/Config.plist b/source/LinkedIn.popclipext/Config.plist deleted file mode 100644 index ba9327c82..000000000 --- a/source/LinkedIn.popclipext/Config.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Actions - - - Image File - in.png - Regular Expression - (?s)^.{1,195}$ - Script Interpreter - /usr/bin/php - Shell Script File - linkedin.php - Title - LinkedIn - - - Extension Description - - en - Search for the selected name on LinkedIn. - - Extension Identifier - com.pilotmoon.popclip.extension.linkedin - Extension Name - LinkedIn - Required Software Version - 701 - - diff --git a/source/LinkedIn.popclipext/LinkedIn-demo.gif b/source/LinkedIn.popclipext/LinkedIn-demo.gif deleted file mode 100644 index 81f7eb579..000000000 Binary files a/source/LinkedIn.popclipext/LinkedIn-demo.gif and /dev/null differ diff --git a/source/LinkedIn.popclipext/linkedin.js b/source/LinkedIn.popclipext/linkedin.js deleted file mode 100644 index 44f55caf3..000000000 --- a/source/LinkedIn.popclipext/linkedin.js +++ /dev/null @@ -1,37 +0,0 @@ -function personName(string) { - // regex to match something like a name - (First [middle] [middle] [middle]) (Last) - const regex=/^\s*([^\s]+(?:\s[^\s]+){0,3})(?:\s([^\s]+))\s*$/u; - const result = regex.exec(string); - if (result) { - return [result[1], result[2]]; - } -} - -if (typeof(define) !== 'undefined') { - define(() => { - return (selection) => { - const parts = personName(selection.text); - if (parts) { // only return an action if the regex matches - return () => { - const [first, last] = parts.map(encodeURIComponent); - popclip.openUrl(`https://www.linkedin.com/pub/dir/?first=${first}+&last=${last}&search=Go`); - }; - } - } - }); -} -else { // when running in jsc, perform tests - function test() { - const data = [ - ["John Smith", ["John","Smith"]], - ["John J Smith", ["John J","Smith"]], - ["a b c d", ["a b c","d"]], - ]; - data.forEach((pair) => { - const [input, output]=pair; - const result=personName(input); - print(`${output.join()==result.join()?'pass ':'fail *'} ${input} => ${result} (expected: ${output})`); - }); - } - test(); -} diff --git a/source/LinkedIn.popclipext/linkedin.php b/source/LinkedIn.popclipext/linkedin.php deleted file mode 100644 index 534737518..000000000 --- a/source/LinkedIn.popclipext/linkedin.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file