update 2.2 version
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Auto post facebook extensions",
|
||||
"version": "2.0",
|
||||
"version": "2.2",
|
||||
"action": {
|
||||
"default_popup": "index.html",
|
||||
"default_icon": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{R as c,j as s,Q as u,q as l,P as d}from"./popup-kaIXPDj2.js";import"./_commonjsHelpers-CqkleIqs.js";import"./app-BbB6QE4i.js";import"./contants-B7iUcdIs.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c.createRoot(document.getElementById("root")).render(s.jsx(u,{client:l,children:s.jsx(d,{})}));
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{r as m,j as o,T as b,R as j,Q as E,q as T,P as C}from"../assets/popup-kaIXPDj2.js";import{C as w}from"../assets/contants-B7iUcdIs.js";import"../assets/_commonjsHelpers-CqkleIqs.js";import"../assets/app-BbB6QE4i.js";var I=(t,n,d,a,i,r,u,p)=>{let s=document.documentElement,h=["light","dark"];function c(e){(Array.isArray(t)?t:[t]).forEach(l=>{let g=l==="class",S=g&&r?i.map(y=>r[y]||y):i;g?(s.classList.remove(...S),s.classList.add(r&&r[e]?r[e]:e)):s.setAttribute(l,e)}),x(e)}function x(e){p&&h.includes(e)&&(s.style.colorScheme=e)}function v(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)c(a);else try{let e=localStorage.getItem(n)||d,l=u&&e==="system"?v():e;c(l)}catch{}},N=m.createContext(void 0),R={setTheme:t=>{},themes:[]},k=()=>{var t;return(t=m.useContext(N))!=null?t:R};m.memo(({forcedTheme:t,storageKey:n,attribute:d,enableSystem:a,enableColorScheme:i,defaultTheme:r,value:u,themes:p,nonce:s,scriptProps:h})=>{let c=JSON.stringify([d,n,r,t,p,u,a,i]).slice(1,-1);return m.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?s:"",dangerouslySetInnerHTML:{__html:`(${I.toString()})(${c})`}})});const M=({...t})=>{const{theme:n="system"}=k();return o.jsx(b,{theme:n,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})},f=document.getElementById(w.ID_EXTENSION);f&&j.createRoot(f).render(o.jsx(o.Fragment,{children:o.jsxs(E,{client:T,children:[o.jsx("div",{className:"fixed bottom-20 right-6 ex-root",children:o.jsx(C,{})}),o.jsx(M,{position:"top-right"})]})}));
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 566 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<script type="module" crossorigin src="/assets/popup.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-CqkleIqs.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/app-BbB6QE4i.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/contants-B7iUcdIs.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/popup-kaIXPDj2.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Auto post facebook extensions",
|
||||
"version": "2.1",
|
||||
"action": {
|
||||
"default_popup": "index.html",
|
||||
"default_icon": {
|
||||
"16": "icons/16.png",
|
||||
"32": "icons/32.png",
|
||||
"128": "icons/128.png"
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "background/background.js",
|
||||
"type": "module"
|
||||
},
|
||||
"host_permissions": ["https://www.facebook.com/*"],
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://www.facebook.com/*"],
|
||||
"js": ["content/content.js"],
|
||||
"type": "module"
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["content/inject-ui.js", "assets/*"],
|
||||
"matches": ["https://www.facebook.com/*"]
|
||||
}
|
||||
],
|
||||
"permissions": ["tabs", "activeTab", "scripting", "storage"],
|
||||
"icons": {
|
||||
"16": "icons/16.png",
|
||||
"32": "icons/32.png",
|
||||
"128": "icons/128.png"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1 @@
|
|||
function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{R as c,j as s,Q as u,q as l,P as d}from"./popup-CRtC0Cyv.js";import"./_commonjsHelpers-CqkleIqs.js";import"./app-BbB6QE4i.js";import"./contants-Cr4DIbgP.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c.createRoot(document.getElementById("root")).render(s.jsx(u,{client:l,children:s.jsx(d,{})}));
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{r as m,j as o,T as b,R as j,Q as E,q as T,P as C}from"../assets/popup-CRtC0Cyv.js";import{C as w}from"../assets/contants-Cr4DIbgP.js";import"../assets/_commonjsHelpers-CqkleIqs.js";import"../assets/app-BbB6QE4i.js";var I=(t,n,d,a,i,r,u,p)=>{let s=document.documentElement,h=["light","dark"];function c(e){(Array.isArray(t)?t:[t]).forEach(l=>{let g=l==="class",S=g&&r?i.map(y=>r[y]||y):i;g?(s.classList.remove(...S),s.classList.add(r&&r[e]?r[e]:e)):s.setAttribute(l,e)}),x(e)}function x(e){p&&h.includes(e)&&(s.style.colorScheme=e)}function v(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)c(a);else try{let e=localStorage.getItem(n)||d,l=u&&e==="system"?v():e;c(l)}catch{}},N=m.createContext(void 0),R={setTheme:t=>{},themes:[]},k=()=>{var t;return(t=m.useContext(N))!=null?t:R};m.memo(({forcedTheme:t,storageKey:n,attribute:d,enableSystem:a,enableColorScheme:i,defaultTheme:r,value:u,themes:p,nonce:s,scriptProps:h})=>{let c=JSON.stringify([d,n,r,t,p,u,a,i]).slice(1,-1);return m.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?s:"",dangerouslySetInnerHTML:{__html:`(${I.toString()})(${c})`}})});const M=({...t})=>{const{theme:n="system"}=k();return o.jsx(b,{theme:n,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})},f=document.getElementById(w.ID_EXTENSION);f&&j.createRoot(f).render(o.jsx(o.Fragment,{children:o.jsxs(E,{client:T,children:[o.jsx("div",{className:"fixed bottom-20 right-6 ex-root",children:o.jsx(C,{})}),o.jsx(M,{position:"top-right"})]})}));
|
||||
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 566 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<script type="module" crossorigin src="/assets/popup.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-CqkleIqs.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/app-BbB6QE4i.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/contants-Cr4DIbgP.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/popup-CRtC0Cyv.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Auto post facebook extensions",
|
||||
"version": "2.2",
|
||||
"action": {
|
||||
"default_popup": "index.html",
|
||||
"default_icon": {
|
||||
"16": "icons/16.png",
|
||||
"32": "icons/32.png",
|
||||
"128": "icons/128.png"
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "background/background.js",
|
||||
"type": "module"
|
||||
},
|
||||
"host_permissions": ["https://www.facebook.com/*"],
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://www.facebook.com/*"],
|
||||
"js": ["content/content.js"],
|
||||
"type": "module"
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["content/inject-ui.js", "assets/*"],
|
||||
"matches": ["https://www.facebook.com/*"]
|
||||
}
|
||||
],
|
||||
"permissions": ["tabs", "activeTab", "scripting", "storage"],
|
||||
"icons": {
|
||||
"16": "icons/16.png",
|
||||
"32": "icons/32.png",
|
||||
"128": "icons/128.png"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { clsx, type ClassValue } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
|
|
@ -61,16 +62,26 @@ export function mapToIPost(raw: any): IPost {
|
|||
|
||||
// build description rõ ràng, không có thụt đầu dòng
|
||||
const descriptionLines = [
|
||||
raw.description || "",
|
||||
raw.code || "",
|
||||
raw.title || "",
|
||||
(typeof raw?.category === "string" ? raw.category : raw?.category?.name) ||
|
||||
"",
|
||||
packageContainText,
|
||||
`Join the "Prology | Latest Products & Deals" group for more products.`,
|
||||
// raw.description || "",
|
||||
// raw.code || "",
|
||||
// raw.title || "",
|
||||
// (typeof raw?.category === "string" ? raw.category : raw?.category?.name) ||
|
||||
// "",
|
||||
// packageContainText,
|
||||
// `Join the "Prology | Latest Products & Deals" group for more products.`,
|
||||
`${raw.code || ""}\n`,
|
||||
`${raw?.title || ""}\n\n`,
|
||||
`Please see visit our website or our warehouse at Lidcombe, NSW 2141\n`,
|
||||
`Prology is a trusted supplier of enterprise networking equipment, specialising in Cisco, HP, Dell, and Juniper — with warehouses in Lidcombe, NSW (AU) and California (USA).`,
|
||||
`- Genuine products`,
|
||||
`- Fully tested hardware`,
|
||||
`- Competitive pricing`,
|
||||
`- Fast technical support`,
|
||||
`- 10+ years in the networking industry`,
|
||||
]
|
||||
.filter(Boolean) // loại bỏ cái rỗng
|
||||
.join("\n\n"); // cách 1 dòng giữa các block
|
||||
.join("\n"); // cách 1 dòng giữa các block
|
||||
// .join("\n\n"); // cách 1 dòng giữa các block
|
||||
|
||||
return {
|
||||
images,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class FacebookService {
|
|||
"/html/body/div[1]/div/div[1]/div/div[3]/div/div/div[1]/div[1]/div[1]/div/div[3]/div[1]/div[2]/div/div/div[7]/a/div",
|
||||
item_for_sell:
|
||||
"/html/body/div[1]/div/div[1]/div/div[5]/div/div/div[3]/div[2]/div[2]/div/div/div[2]/div[1]/div/span/div/div/div[1]/div/div",
|
||||
market_container: '[aria-label="Marketplace"]',
|
||||
market_container: '[aria-label="Marketplace"][role="form"]',
|
||||
collection_marketplace:
|
||||
'[aria-label="Collection of your Marketplace items"]',
|
||||
};
|
||||
|
|
|
|||