diff --git a/.env.development b/.env.development
index 8294f0ab..f99d9721 100644
--- a/.env.development
+++ b/.env.development
@@ -1,12 +1,14 @@
-REACT_APP_VERSION=3.63.3-dev
-REACT_APP_SEARCH_API=https://endpoint.d.buzz/api/v1
-REACT_APP_SCRAPE_API=https://endpoint.d.buzz/api/v1/meta
-REACT_APP_IMAGE_API=https://us-central1-dbuzz-3a79e.cloudfunctions.net/uploadImageEndpoint
-REACT_APP_VIDEO_API=https://endpoint.d.buzz/api/v1/video
-REACT_APP_CENSOR_API=https://us-central1-dbuzz-3a79e.cloudfunctions.net/censorAPI
-REACT_APP_DATABASE_API=https://endpoint.d.buzz/api/v1/database
-REACT_APP_DATABASE_AUTH_KEY=a2ddaa58be7b4606b88c64822b6ead7a=
-REACT_APP_PRICE_CHART_API=https://endpoint.d.buzz/api/v1/price
-REACT_APP_DEFAULT_RPC_NODE=https://rpc.d.buzz
-REACT_APP_STAGING_VERSION=0.14.2
-REACT_APP_ENV=dev
+REACT_APP_VERSION=
+REACT_APP_SEARCH_API=
+REACT_APP_SCRAPE_API=
+REACT_APP_IMAGE_API=
+REACT_APP_VIDEO_API=
+REACT_APP_CENSOR_API=
+REACT_APP_DATABASE_API=
+REACT_APP_DATABASE_AUTH_KEY=
+REACT_APP_PRICE_CHART_API=
+REACT_APP_DEFAULT_RPC_NODE=
+REACT_APP_STAGING_VERSION=
+REACT_APP_FLEEK_BUCKET=
+REACT_APP_HIVE_API_NODE=
+REACT_APP_ENV=dev
\ No newline at end of file
diff --git a/.env.production b/.env.production
index fea4f563..48c90eec 100644
--- a/.env.production
+++ b/.env.production
@@ -1,13 +1,13 @@
REACT_APP_VERSION=$npm_package_version
-REACT_APP_SEARCH_API=https://endpoint.d.buzz/api/v1
-REACT_APP_SCRAPE_API=https://endpoint.d.buzz/api/v1/meta
-REACT_APP_IMAGE_API=https://us-central1-dbuzz-3a79e.cloudfunctions.net/uploadImageEndpoint
-REACT_APP_VIDEO_API=https://endpoint.d.buzz/api/v1/video
-REACT_APP_CENSOR_API=https://us-central1-dbuzz-3a79e.cloudfunctions.net/censorAPI
-REACT_APP_DATABASE_API=https://endpoint.d.buzz/api/v1/database
-REACT_APP_DATABASE_AUTH_KEY=a2ddaa58be7b4606b88c64822b6ead7a=
-REACT_APP_PRICE_CHART_API=https://endpoint.d.buzz/api/v1/price
-REACT_APP_FLEEK_API_KEY=jeBGh6s3KbqeYjCfPMmOJw==
-REACT_APP_FLEEK_API_SECRET=dShJSfkZpCB4t7EyZzcmjoeG22zvE9CvxB684cCLtEQ=
-REACT_APP_DEFAULT_RPC_NODE=https://rpc.d.buzz
-REACT_APP_ENV=prod
+REACT_APP_SEARCH_API=
+REACT_APP_SCRAPE_API=
+REACT_APP_IMAGE_API=
+REACT_APP_VIDEO_API=
+REACT_APP_CENSOR_API=
+REACT_APP_DATABASE_API=
+REACT_APP_DATABASE_AUTH_KEY=
+REACT_APP_PRICE_CHART_API=
+REACT_APP_DEFAULT_RPC_NODE=
+REACT_APP_FLEEK_BUCKET=
+REACT_APP_HIVE_API_NODE=
+REACT_APP_ENV=prod
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 1ddbd1ff..7554c7b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,9 @@
.env.test.local
.env.production.local
+.env.development
+.env.production
+
npm-debug.log*
yarn-debug.log*
yarn-error.log*
diff --git a/README.md b/README.md
index 00a005b9..42c342b7 100644
--- a/README.md
+++ b/README.md
@@ -1,38 +1,233 @@
-### DBUZZ FRONTEND
-Frontend for DBUZZ Community
+# D.Buzz Frontend
-### Contribution
+## Introduction to D.Buzz
-All development will be on the ```dev``` branch.
+### D.Buzz: A New Era of Social Media on the Hive Blockchain
-Code will be pushed to ```dev``` branch after reviewing.
+D.Buzz is an innovative social media platform that reimagines online social interaction. Built on the Hive blockchain, it stands out for its decentralized nature and focus on user empowerment. Unlike conventional social media, D.Buzz prioritizes freedom of speech and privacy, utilizing blockchain technology to enhance user experience.
-**TESTNET**: ```testnet``` branch will only be updated via ```dev``` branch.
+#### Key Features:
-Once testing and bug are fixed on ```Testnet```, the code will be pushed to ```stable``` branch.
+- **Decentralization:** DBuzz operates without a central authority, promoting free expression and minimizing censorship, thanks to its Hive blockchain foundation.
+- **Content Monetization:** Users can earn Hive tokens through their content, providing a unique way to gain rewards for their creative efforts.
+- **Community Governance:** With a stake-based governance system, users holding more Hive tokens have a greater say in content moderation and platform direction.
+- **Transparency and Security:** Leveraging blockchain technology, D.Buzz ensures secure and transparent record-keeping of all interactions.
+- **User-Friendly Interface:** Despite its advanced backend, D.Buzz offers an interface similar to mainstream social media, complete with familiar features.
+- **Hive Integration:** Being part of the Hive ecosystem, the platform smoothly integrates with Hive, enhancing the experience for blockchain enthusiasts.
-**MAINNET**: ```mainnet``` branch will only be updated for production via ```stable``` branch.
+#### Conclusion:
-1. Clone ```dev``` branch ```git clone -b dev https://github.com/d-buzz/d.buzz-client.git```
-2. Create a local branch
-3. Open PR and make sure the base branch should be ```dev``` branch
-3. Changes will be reviewed and merged to ```dev``` branch
-4. Changes will be deployed to ```TESTNET``` for beta testing
-5. Stable code on ```TESTNET``` will be deployed to our ```MAINNET``` as a new release
+D.Buzz represents a significant development in the intersection of social media and blockchain technology, offering a platform where user rights, creativity, and secure, transparent governance are key. It's an exciting step forward for those seeking a more decentralized and rewarding social media experience.
+# D.Buzz Frontend
+
+This is the frontend codebase that powers the D.Buzz social platform. It is built using React and Redux.
+
+## Overview and Main Pages
+
+The project's frontend is structured around several key pages, each serving a distinct purpose within the D.Buzz platform:
+
+- **Home (`Home`)**: This page component shows the latest posts across the platform.
+- **Landing (`Landing`)**: This page is similar to the Home page but is specifically tailored for unauthenticated users, showcasing trending posts to give a glimpse of the platform's activity.
+- **Profile (`Profile`)**: The user profile page provides detailed information about users, including their posts, replies, wallet transactions, and settings. It also includes sub-routes for additional profile-related views.
+- **Wallet (`Wallet`)**: Users can view their wallet balances and transaction history on this page, managing their Hive blockchain financial activities.
+- **Search (`Search`)**: This page allows users to search for posts and other users on the platform, providing a search results page to display the findings.
+- **Content (`Content`)**: A detailed view for individual posts or comments, including the ability to view and post replies.
+
+The frontend utilizes Redux for global state management, with Sagas handling data fetching asynchronously. React Router is employed for navigation and routing across the platform, ensuring users can smoothly transition between pages. Additionally, the `components/` directory contains reusable UI components that are utilized throughout the application to maintain a consistent look and feel.
+
+## Data Fetching
+
+Data is fetched from the D.Buzz endpoint server using Redux Sagas. The main requests are handled in `services/api.js`, which contains the API calls to the D.Buzz server. These calls are made to the D.Buzz endpoint server which provides the necessary API calls that are not available through the standard Hive blockchain API.
+
+The API calls include fetching posts, comments, user profiles, and other related data. The `SEARCH_API` uses the D.Buzz endpoint server to provide the necessary API calls that are not available through the standard Hive blockchain API. The data is retrieved using JSON-RPC calls over HTTP to `rpc.d.buzz`. The responses from these calls are then processed and managed within the Redux store, with related actions and reducers located in `store/*.js`.
+
+The `services/api.js` file abstracts the complexity of direct blockchain interactions and provides simple methods that are used throughout the application to request and receive data from the Hive blockchain.
+
+## Components
+
+Reusable components are located in `components/`. This includes common UI elements in `elements/` as well as core containers like:
+
+### Pages
+- `Home` - The main landing page component for authenticated users.
+- `Landing` - The landing page for unauthenticated users, showcasing trending posts.
+- `Content` - A detailed view for individual posts or comments.
+- `Profile` - The user profile page with detailed information and sub-routes.
+- `Wallet` - Users can view their wallet balances and transaction history.
+- `Search` - Allows users to search for posts and other users on the platform.
+- `Latest` - Displays the latest posts across the platform.
+- `Tags` - Shows posts associated with specific tags.
+- `Trending` - Lists trending posts based on user interactions.
+- `GetStarted` - Provides information for new users on how to get started.
+- `TermsConditions` - Outlines the terms and conditions of using the platform.
+- `PrivacyPolicy` - Details the privacy policy of the platform.
+- `Developers` - Information and tools for developers.
+
+### Common
+- `HelmetGenerator` - Manages changes to the document head.
+- `InfiniteList` - Infinite scroll post list.
+- `ReplyList` - Display list of replies.
+- `PostList` - Display list of posts.
+- `Avatar` - Displays user avatars.
+
+### Form
+- `CreateBuzzForm` - Form for creating new buzzes.
+
+### Modal
+- `WhatsNewModal` - Modal for displaying new features or announcements.
+- `EventsModal` - Modal for displaying upcoming events.
+- `AddToPocketModal` - Modal for adding posts to a user's bookmarks.
+- `ViewImageModal` - Modal for viewing images in posts.
+- `LinkConfirmationModal` - Modal for confirming external links.
+- `DeleteBuzzModal` - Modal for confirming deletion of a buzz.
+
+### Profile
+- `ProfileSkeleton` - Skeleton screen for profile loading state.
+- `EditProfileModal` - Modal for editing user profile.
+- `HiddenBuzzListModal` - Modal for managing hidden buzzes.
+
+### Element
+- `Spinner` - Loading spinner animation.
+- `ContainedButton` - A styled button element.
+- `MoreCircleIconRed` - A styled icon for more options.
+- `CustomizedMenu` - A custom menu component.
+
+### Skeleton
+- `ContentSkeleton` - Skeleton screen for content loading state.
+- `ReplylistSkeleton` - Skeleton screen for reply list loading state.
+
+### Other
+- `VoteListDialog` - Dialog for displaying list of votes.
+- `UpdateFormModal` - Modal for updating posts.
+- `UserDialog` - Dialog for displaying user information.
+- `TwitterEmbedAPI` - Component for embedding Twitter posts.
+- `Notification` - Component for displaying notifications.
+
+## Styling
+
+The site uses JSS for styling components. The main theme file with base styles is `services/theme.js` and components define styles using `react-jss`.
+
+## Development
+
+Before starting the dev server, make sure you setup `.env.development` and `.env.production` files with your own variables.
+
+To run locally:
+
+```
+yarn install
+yarn start
+```
+
+This will start the dev server at http://localhost:3000.
+
+To run tests:
+
+```
+yarn test
+```
+
+This will execute the test suite and output the results.
+
+## Embedding the Buzz Button
+
+The Buzz Button allows users to easily share content on DBuzz from any website. To embed the Buzz Button, include the following anchor element with the `dbuzz-share-button` class in your HTML:
+
+```html
+Buzz
+```
+
+Replace `WEB_INTENT_URL` with the URL to the DBuzz Web Intent Composer. You can customize the button using `data-*` attributes for text, size, hashtags, and minimum character count.
+
+Include the `buzzWidget.js` script in your page template to enable the Buzz Button:
+
+```html
+
+```
+
+Replace `BUZZ_WIDGET_JS_URL` with the URL to the `buzzWidget.js` script.
+
+## Build & Deploy
+
+To create a production build:
+
+```
+yarn build
+```
+
+The app is configured to build from the `master` branch.
+
+## Contributing
+
+We warmly welcome community contributions to D.Buzz. Whether it's reporting bugs, suggesting enhancements, or submitting pull requests for bug fixes and new features, your involvement is invaluable to the project.
+
+### How to Contribute:
+
+1. **Clone and Branch:** Start by cloning the `dev` branch: `git clone -b dev https://github.com/d-buzz/d.buzz-client.git`. Create a local branch for your contributions.
+2. **Develop and Test:** Make your changes and test them thoroughly. Please adhere to the coding conventions and guidelines as outlined in our documentation.
+3. **Open a Pull Request (PR):** Once you're ready, open a PR against the `dev` branch. Ensure your PR description clearly explains your changes or the issue it resolves.
+4. **Review Process:** Your PR will be reviewed by the maintainers. This process ensures that the codebase remains consistent and that the quality of the project is maintained.
+5. **Deployment:**
+- **Testnet:** Changes merged into the `dev` branch will be deployed to the `testnet` branch for beta testing.
+- **Mainnet:** Once we confirm the stability of the changes on `testnet`, they will be merged into the `stable` branch and subsequently deployed to the `mainnet` for production.
+
+### Guidelines:
+
+- **Issues and Pull Requests:** Before creating new issues or pull requests, please check existing ones to avoid duplicates.
+- **Commit Messages:** Follow our commit message conventions for clarity. [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716).
+- **Code Style:** Ensure your code follows the established style of the project to maintain consistency.
+
+### Community Engagement:
+
+- Join the conversation: For any questions, support, or bug reporting, visit our [community chat](https://chat.d.buzz).
+- Stay Informed: Keep up with the latest developments and participate in discussions.
+
+Your contributions, big or small, play a significant part in the evolution of D.Buzz. We thank you for your support and enthusiasm!
+
+## Lite Accounts with MetaMask and Ceramic Network
+
+D.Buzz now supports lite accounts, allowing users to log in using their MetaMask wallets and interact with the Ceramic Network. This integration provides a seamless experience for users who prefer to use their Ethereum credentials and decentralized identity profiles.
+
+### MetaMask Login
+
+Users can easily log in to D.Buzz using their MetaMask wallet. This feature leverages the widely-used Ethereum wallet to authenticate users without the need for traditional sign-up processes.
+
+### Ceramic Network Integration
+
+Ceramic Network is a decentralized data network that enables the creation, hosting, and sharing of data without centralized control. By integrating with Ceramic, D.Buzz allows users to manage their decentralized identities and store data in a secure, user-controlled environment.
+
+## Accessing Lite Accounts
+
+To work with lite accounts, you need to switch to the `lite` branch in the project repository. You can do this by running the following commands in your terminal:
+
+```sh
+git checkout lite
+```
+
+This will switch your local workspace to the `lite` branch where you can make changes and test lite account features.
+
+## License
+
+This project is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
+
+For more information, please refer to
+
+## Contact, Support, and Reporting Issues
+
+For any questions, support issues, or to report bugs with the platform, please visit our chat at . We appreciate your contributions to improving D.Buzz.
### Testing
Perform a lint test:
-```npm run lint```
+`npm run lint`
### Commit Messages
We use Semantic Commit Messages:
https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716
-### CI/CD
-2. CircleCI (Testing)
-1. Fleek - IPFS (Deployment)
-
### Versioning
We use Semantic Versioning for our releases:
https://semver.org/
+
+
+
diff --git a/config-overrides.js b/config-overrides.js
new file mode 100644
index 00000000..fea8185e
--- /dev/null
+++ b/config-overrides.js
@@ -0,0 +1,33 @@
+const webpack = require('webpack');
+
+module.exports = function override(config) {
+ // Fallback configurations for compatibility
+ const fallback = config.resolve.fallback || {};
+ Object.assign(fallback, {
+ "crypto": require.resolve("crypto-browserify"),
+ "stream": require.resolve("readable-stream"),
+ "assert": require.resolve("assert"),
+ "http": require.resolve("stream-http"),
+ "https": require.resolve("https-browserify"),
+ "os": require.resolve("os-browserify"),
+ "url": require.resolve("url")
+ });
+ config.resolve.fallback = fallback;
+
+ // Plugins configuration
+ config.plugins = (config.plugins || []).concat([
+ new webpack.ProvidePlugin({
+ process: 'process/browser.js', // updated the path
+ Buffer: ['buffer', 'Buffer']
+ })
+ ]);
+
+ // Disable source maps
+ config.devtool = false;
+
+ config.stats = {
+ warnings: false
+ };
+
+ return config;
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index dfcda167..f6277509 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,12 @@
{
"name": "d.buzz-client",
"homepage": ".",
- "version": "3.44.4",
+ "version": "3.45.0",
"private": true,
"dependencies": {
"3id-blockchain-utils": "^1.3.1",
- "@ceramicnetwork/http-client": "^1.5.7",
+ "@apollo/client": "^3.7.10",
+ "@ceramicnetwork/http-client": "^2.35.0",
"@ceramicstudio/idx": "^0.12.2",
"@fingerprintjs/fingerprintjs": "^3.3.2",
"@fleekhq/fleek-storage-js": "^1.0.24",
@@ -14,28 +15,34 @@
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.56",
"@mintrawa/hive-auth-client": "^0.0.8",
- "@spknetwork/graph-client": "^1.1.1",
+ "@spknetwork/graph-client": "1.2.2",
"@stablelib/sha256": "^1.0.1",
- "axios": "^0.21.1",
+ "@walletconnect/ethereum-provider": "^2.10.0",
+ "@walletconnect/modal": "^2.6.1",
+ "@walletconnect/time": "^1.0.2",
+ "axios": "^1.6.0",
"bluebird": "^3.7.2",
"bootstrap": "^4.5.0",
"browser-image-compression": "^1.0.15",
+ "buffer": "^6.0.3",
"caesar-shift": "^1.0.0",
"classnames": "^2.2.6",
- "crypto-js": "^4.0.0",
- "dids": "^2.4.3",
+ "crypto-js": "^4.2.0",
+ "dids": "^4.0.4",
"diff-match-patch": "^1.0.5",
"emoji-mart": "^3.0.1",
"env-cmd": "^10.1.0",
+ "graphql": "^16.8.1",
"heic2any": "^0.0.4",
"immutable": "^4.0.0-rc.12",
"js-cookie": "^3.0.5",
"key-did-provider-ed25519": "^1.1.0",
"key-did-resolver": "^1.4.4",
"lottie-react": "^2.1.0",
- "markdown-link-extractor": "^1.2.3",
+ "markdown-link-extractor": "^3.1.0",
"moment": "^2.27.0",
"npm-text-parser": "^1.0.8",
+ "process": "^0.11.10",
"qrcode.react": "^1.0.1",
"query-string": "^6.13.1",
"react": "^16.13.1",
@@ -59,7 +66,7 @@
"react-router-dom": "^5.2.0",
"react-router-hash-link": "^2.3.1",
"react-router-last-location": "^2.0.1",
- "react-scripts": "^3.4.3",
+ "react-scripts": "^5.0.1",
"react-scrollspy": "^3.4.3",
"react-share": "^4.4.0",
"react-soundcloud-embedded": "^2.0.7",
@@ -74,21 +81,21 @@
"redux-saga-thunk": "^0.7.3",
"remove-markdown": "^0.3.0",
"rxjs": "^7.5.4",
- "sanitize-html": "1.27.0",
+ "sanitize-html": "2.3.2",
"source-map-explorer": "^2.5.2",
"speakingurl": "^14.0.1",
"typewriter-effect": "^2.17.0",
"uint8arrays": "^3.0.0",
"uuid": "^8.2.0",
"uuid-random": "^1.3.2",
- "web3": "^1.7.1",
+ "web3": "^4.3.0",
"web3modal": "^1.9.5"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
- "start": "PORT=2020 env-cmd -f .env.development react-scripts start",
- "build:dev": "env-cmd -f .env.development react-scripts build && chmod +X ./change-version.sh",
- "build:prod": "env-cmd -f .env.production react-scripts build && chmod +X ./change-version.sh",
+ "start": "PORT=2020 GENERATE_SOURCEMAP=false env-cmd -f .env.development react-app-rewired start",
+ "build:dev": "env-cmd -f .env.development react-app-rewired build && chmod +X ./change-version.sh",
+ "build:prod": "env-cmd -f .env.production react-app-rewired build && chmod +X ./change-version.sh",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint src",
@@ -111,19 +118,49 @@
]
},
"devDependencies": {
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
+ "assert": "^2.0.0",
+ "browser": "^0.2.6",
+ "buffer": "^6.0.3",
+ "crypto-browserify": "^3.12.0",
"enzyme": "^3.11.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.22.0",
"gulp": "^4.0.2",
"gulp-uglify": "^3.0.2",
+ "https-browserify": "^1.0.0",
"jquery": "^3.5.1",
+ "os-browserify": "^0.3.0",
"popper.js": "^1.16.1",
- "typescript": "^4.1.3"
+ "process": "^0.11.10",
+ "react-app-rewired": "^2.2.1",
+ "readable-stream": "^4.2.0",
+ "stream-browserify": "^3.0.0",
+ "stream-http": "^3.2.0",
+ "typescript": "^4.1.3",
+ "url": "^0.11.0"
},
"resolutions": {
"did-jwt": "5.1.0",
- "react-virtualized": "9.18.5"
+ "react-virtualized": "9.18.5",
+ "uint8arrays": "^3.0.0",
+ "nth-check": "^2.0.1",
+ "fast-json-patch": "3.1.1",
+ "glob-parent": "5.1.2",
+ "axios": "^1.6.0",
+ "postcss": "8.4.31",
+ "@babel/traverse": "7.23.2",
+ "@adobe/css-tools": "4.3.2",
+ "crypto-js": "4.2.0",
+ "graphql": "16.8.1",
+ "browserify-sign": "4.2.2",
+ "tough-cookie": "4.1.3",
+ "sanitize-html": "2.3.2",
+ "web3": "4.3.0"
+ },
+ "browser": {
+ "process": "process/browser.js"
}
-}
+}
\ No newline at end of file
diff --git a/public/buzzWidget.js b/public/buzzWidget.js
index 8c6fc5ca..4cf79435 100644
--- a/public/buzzWidget.js
+++ b/public/buzzWidget.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).__dbuzzwidget=e()}(this,function(){"use strict";const A=window.document;const t=new function(){var o="dbuzz-share-button",e=/d\.buzz\/#\/intent\/buzz/;this.i=function(){var e=A.getElementsByClassName(o);for(let t=e.length;t--;)n(e[t],t)};const n=function(t,e){const n=h("iframe");var i=f(t),r="https://d.buzz/widgets/buzz_button.html#"+s(t,e);let u="position: static; visibility: visible;";u+="l"===i?"width: 76px; height: 28px;":"width: 60px; height: 20px;",n.setAttribute("id","dbuzz-widget-"+e),n.setAttribute("title","Dbuzz share button"),n.setAttribute("class",o),n.setAttribute("allowtransparency",!0),n.setAttribute("scrolling","no"),n.setAttribute("frameBorder",0),n.setAttribute("style",u),n.setAttribute("src",r),t.parentNode.insertBefore(n,t),t.remove()},s=function(t,e){t={original_referrer:b(location.href),id:"dbuzz-widget-"+e,text:b(a(t)),size:f(t),url:b(c(t)),tags:m(l(t).trim(),"#",""),min_chars:parseInt(d(t)),origin_app_name:u()};let n="",i=[],r=0;return Object.entries(t).forEach(function(t){var[e,t]=t;t&&(n&&(n+="&"),n+=e+"={"+r+"}",i.push(t),r++)}),g(n,i)};function i(t,e){let n="";return(t=r(t,"href"))&&(t=(t=w(t))?t.input:"",(t=z(p(t)))&&t[e]&&(n=t[e])),n}const u=function(){return A.title||location.hostname||"The site/app you are buzzing from"},c=function(t){return i(t,"url")||r(t,"data-url")||location.href||""},a=function(t){return i(t,"text")||r(t,"data-text")||""},f=function(t){let e=i(t,"size")||r(t,"data-size")||"medium";return e=e.toLowerCase(),"large"==e||"medium"==e?e.charAt(0):"m"},l=function(t){return i(t,"tags")||r(t,"data-hashtags")||""},d=function(t){return i(t,"min_chars")||r(t,"data-min-chars")||0},h=function(t){return A.createElement(t)},r=function(t,e){return t.getAttribute(e)},p=function(t){t=t&&t.split("?");return 2===t.length?t[1]:""},b=function(t){return encodeURIComponent(t)},m=function(t,e,n){return t?t.replace(e,n):""},z=function(t){let i={};return t?(t.split("&").forEach(function(t){var e=t.split("="),n=e[0],t=e[1];2===e.length&&(i[n]=decodeURIComponent(t))}),i):{}},g=function(t,n){return t.replace(/\{(\d+)\}/g,function(t,e){return n[e]||t})},w=function(t){return t.match(e)}};return t.i(),{init:function(){t.i()}}});
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).__dbuzzwidget=e()}(this,function(){"use strict";const A=window.document;const t=new function(){var o="dbuzz-share-button",e=/d\.buzz\/intent\/buzz/;this.i=function(){var e=A.getElementsByClassName(o);for(let t=e.length;t--;)n(e[t],t)};const n=function(t,e){const n=h("iframe");var i=f(t),r="https://d.buzz/widgets/buzz_button.html#"+s(t,e);let u="position: static; visibility: visible;";u+="l"===i?"width: 76px; height: 28px;":"width: 60px; height: 20px;",n.setAttribute("id","dbuzz-widget-"+e),n.setAttribute("title","Dbuzz share button"),n.setAttribute("class",o),n.setAttribute("allowtransparency",!0),n.setAttribute("scrolling","no"),n.setAttribute("frameBorder",0),n.setAttribute("style",u),n.setAttribute("src",r),t.parentNode.insertBefore(n,t),t.remove()},s=function(t,e){t={original_referrer:b(location.href),id:"dbuzz-widget-"+e,text:b(a(t)),size:f(t),url:b(c(t)),tags:m(l(t).trim(),"#",""),min_chars:parseInt(d(t)),origin_app_name:u()};let n="",i=[],r=0;return Object.entries(t).forEach(function(t){var[e,t]=t;t&&(n&&(n+="&"),n+=e+"={"+r+"}",i.push(t),r++)}),g(n,i)};function i(t,e){let n="";return(t=r(t,"href"))&&(t=(t=w(t))?t.input:"",(t=z(p(t)))&&t[e]&&(n=t[e])),n}const u=function(){return A.title||location.hostname||"The site/app you are buzzing from"},c=function(t){return i(t,"url")||r(t,"data-url")||location.href||""},a=function(t){return i(t,"text")||r(t,"data-text")||""},f=function(t){let e=i(t,"size")||r(t,"data-size")||"medium";return e=e.toLowerCase(),"large"==e||"medium"==e?e.charAt(0):"m"},l=function(t){return i(t,"tags")||r(t,"data-hashtags")||""},d=function(t){return i(t,"min_chars")||r(t,"data-min-chars")||0},h=function(t){return A.createElement(t)},r=function(t,e){return t.getAttribute(e)},p=function(t){t=t&&t.split("?");return 2===t.length?t[1]:""},b=function(t){return encodeURIComponent(t)},m=function(t,e,n){return t?t.replace(e,n):""},z=function(t){let i={};return t?(t.split("&").forEach(function(t){var e=t.split("="),n=e[0],t=e[1];2===e.length&&(i[n]=decodeURIComponent(t))}),i):{}},g=function(t,n){return t.replace(/\{(\d+)\}/g,function(t,e){return n[e]||t})},w=function(t){return t.match(e)}};return t.i(),{init:function(){t.i()}}});
\ No newline at end of file
diff --git a/netlify.toml b/public/netlify.toml
similarity index 100%
rename from netlify.toml
rename to public/netlify.toml
diff --git a/public/widgets/buzzWidget.js b/public/widgets/buzzWidget.js
index 50fe1c36..b65fc685 100644
--- a/public/widgets/buzzWidget.js
+++ b/public/widgets/buzzWidget.js
@@ -15,7 +15,7 @@
const resourceBaseUrl = "https://d.buzz";
const buzzButtonHtmlPath = "/widgets/buzz_button.html";
const dbuzzShareClass = "dbuzz-share-button";
- const intentUrlRegex = /d\.buzz\/#\/intent\/buzz/
+ const intentUrlRegex = /d\.buzz\/intent\/buzz/
/**
@@ -32,7 +32,7 @@
const ifrm = createElement("iframe");
const size = getSize(el);
const args = getSource(el, i);
- const source = resourceBaseUrl + buzzButtonHtmlPath + "#" + args;
+ const source = resourceBaseUrl + buzzButtonHtmlPath + '#' + args;
let style = "position: static; visibility: visible;";
if (size === 'l') {
style = style + 'width: 76px; height: 28px;';
@@ -179,4 +179,4 @@
__dbuzzwidget.i();
}
};
-}));
+}));
\ No newline at end of file
diff --git a/public/widgets/buzz_button.html b/public/widgets/buzz_button.html
index 1985b712..f36a327b 100644
--- a/public/widgets/buzz_button.html
+++ b/public/widgets/buzz_button.html
@@ -12,18 +12,18 @@
-