├── src ├── vite-env.d.ts ├── assets │ └── icons │ │ ├── cls.png │ │ ├── hupu.png │ │ ├── github.png │ │ ├── juejin.png │ │ ├── thepaper.png │ │ └── toutiao.png ├── widgets │ ├── douyin │ │ ├── images │ │ │ ├── douyin.png │ │ │ ├── header-bg.png │ │ │ ├── hot_top1.png │ │ │ ├── hot_top2.png │ │ │ └── hot_top3.png │ │ ├── DouyinWidgetView.vue │ │ ├── DouyinWidgetRoutes.ts │ │ ├── model │ │ │ └── DouyinModel.ts │ │ ├── Douyin.widget.ts │ │ └── DouyinWidget.vue │ ├── bilibili │ │ ├── images │ │ │ ├── bilibili.png │ │ │ ├── bilibili_pink.png │ │ │ └── bilibili_tv.png │ │ ├── model │ │ │ └── BilibiliModel.ts │ │ ├── BilibiliWidgetView.vue │ │ ├── BilibiliWidgetRoutes.ts │ │ ├── Bilibili.widget.ts │ │ └── BilibiliWidget.vue │ ├── zhihu │ │ ├── images │ │ │ ├── liukanshan.png │ │ │ └── logo.svg │ │ ├── ZhihuWidgetView.vue │ │ ├── ZhihuWidgetRoutes.ts │ │ ├── Zhihu.widget.ts │ │ ├── model │ │ │ └── ZhihuModel.ts │ │ └── ZhihuWidget.vue │ ├── bangumi │ │ ├── BangumiWidgetView.vue │ │ ├── BangumiWidgetRoutes.ts │ │ ├── model │ │ │ └── BangumiResult.ts │ │ ├── Bangumi.widget.ts │ │ ├── BangumiWidget.vue │ │ └── BangumiItem.vue │ ├── weibo │ │ ├── WeiBoWidgetView.vue │ │ ├── WeiBoWidgetRoutes.ts │ │ ├── model │ │ │ └── WeiBoModel.ts │ │ ├── WeiBo.widget.ts │ │ ├── images │ │ │ └── weibo.svg │ │ └── WeiBoWidget.vue │ ├── tou-tiao │ │ ├── TouTiaoWidgetRoutes.ts │ │ ├── TouTiao.widget.ts │ │ └── TouTiaoWidgetView.vue │ ├── cls-telegraph │ │ ├── ClsTelegraphWidgetRoutes.ts │ │ ├── ClsTelegraph.widget.ts │ │ └── ClsTelegraphWidgetView.vue │ ├── bilibili-rcmd │ │ ├── BilibiliRcmdWidgetRoutes.ts │ │ ├── BilibiliRcmd.widget.ts │ │ └── BilibiliRcmdWidgetView.vue │ ├── widget-router.ts │ └── components │ │ ├── HotspotBox.vue │ │ └── HotspotItem.vue ├── utils │ └── ClsUtils.ts ├── App.vue ├── main.ts ├── shims-vue.d.ts ├── router │ └── index.ts ├── widget.package.ts ├── BubblyButton.vue ├── common │ └── css │ │ └── common.css ├── api │ └── BilibiliApi.ts └── LandingPage.vue ├── public ├── .spa ├── logo.png ├── favicon.ico ├── images │ ├── preview_douyin.png │ ├── preview_zhihu.png │ ├── preview_bangumi.png │ ├── preview_toutiao.png │ ├── weibo_hot_search.png │ ├── bilibili_hot_search.png │ ├── preview_bilibili_rcmd.png │ └── preview_cls_telegraph.png ├── widget.json └── cn.widgetjs.widgets.hotspot.json ├── screenshot.jpg ├── auto-imports.d.ts ├── uno.config.ts ├── release.json ├── release-offline.json ├── .gitignore ├── components.d.ts ├── index.html ├── widget.package.ts ├── vite.config.ts ├── .github └── workflows │ └── github-page.yml ├── tsconfig.json ├── eslint.config.js ├── README.md ├── package.json ├── .eslintcache └── LICENSE /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | // / 2 | -------------------------------------------------------------------------------- /public/.spa: -------------------------------------------------------------------------------- 1 | try_files $uri $uri.html /index.html $uri/ =404; 2 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/logo.png -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/screenshot.jpg -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/assets/icons/cls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/assets/icons/cls.png -------------------------------------------------------------------------------- /src/assets/icons/hupu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/assets/icons/hupu.png -------------------------------------------------------------------------------- /auto-imports.d.ts: -------------------------------------------------------------------------------- 1 | // Generated by 'unplugin-auto-import' 2 | export {} 3 | declare global { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/icons/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/assets/icons/github.png -------------------------------------------------------------------------------- /src/assets/icons/juejin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/assets/icons/juejin.png -------------------------------------------------------------------------------- /uno.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'unocss' 2 | 3 | export default defineConfig({ 4 | 5 | }) 6 | -------------------------------------------------------------------------------- /src/assets/icons/thepaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/assets/icons/thepaper.png -------------------------------------------------------------------------------- /src/assets/icons/toutiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/assets/icons/toutiao.png -------------------------------------------------------------------------------- /public/images/preview_douyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/preview_douyin.png -------------------------------------------------------------------------------- /public/images/preview_zhihu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/preview_zhihu.png -------------------------------------------------------------------------------- /public/images/preview_bangumi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/preview_bangumi.png -------------------------------------------------------------------------------- /public/images/preview_toutiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/preview_toutiao.png -------------------------------------------------------------------------------- /public/images/weibo_hot_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/weibo_hot_search.png -------------------------------------------------------------------------------- /public/images/bilibili_hot_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/bilibili_hot_search.png -------------------------------------------------------------------------------- /src/widgets/douyin/images/douyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/douyin/images/douyin.png -------------------------------------------------------------------------------- /public/images/preview_bilibili_rcmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/preview_bilibili_rcmd.png -------------------------------------------------------------------------------- /public/images/preview_cls_telegraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/public/images/preview_cls_telegraph.png -------------------------------------------------------------------------------- /src/widgets/bilibili/images/bilibili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/bilibili/images/bilibili.png -------------------------------------------------------------------------------- /src/widgets/douyin/images/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/douyin/images/header-bg.png -------------------------------------------------------------------------------- /src/widgets/douyin/images/hot_top1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/douyin/images/hot_top1.png -------------------------------------------------------------------------------- /src/widgets/douyin/images/hot_top2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/douyin/images/hot_top2.png -------------------------------------------------------------------------------- /src/widgets/douyin/images/hot_top3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/douyin/images/hot_top3.png -------------------------------------------------------------------------------- /src/widgets/zhihu/images/liukanshan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/zhihu/images/liukanshan.png -------------------------------------------------------------------------------- /src/widgets/bilibili/images/bilibili_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/bilibili/images/bilibili_pink.png -------------------------------------------------------------------------------- /src/widgets/bilibili/images/bilibili_tv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/widget-js/hotspot/HEAD/src/widgets/bilibili/images/bilibili_tv.png -------------------------------------------------------------------------------- /src/utils/ClsUtils.ts: -------------------------------------------------------------------------------- 1 | export class ClsUtils { 2 | private params = { 3 | appName: 'CailianpressWeb', 4 | os: 'web', 5 | sv: '7.7.5', 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/widgets/bilibili/model/BilibiliModel.ts: -------------------------------------------------------------------------------- 1 | export interface BilibiliModel { 2 | keyword: string 3 | show_name: string 4 | icon: string 5 | uri: string 6 | goto: string 7 | } 8 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /release.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileMap": [ 3 | { 4 | "src": "./dist/", 5 | "dest": "/www/wwwroot/widgetjs.cn/hotspot" 6 | } 7 | ], 8 | "ftpConfig": { 9 | "host": ["mine"] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/widgets/douyin/DouyinWidgetView.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/widgets/bangumi/BangumiWidgetView.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/widgets/zhihu/ZhihuWidgetView.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/widgets/bilibili/BilibiliWidgetView.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/widgets/weibo/WeiBoWidgetView.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /release-offline.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileMap": [ 3 | { 4 | "src": "./dist/widget.json", 5 | "dest": "/www/wwwroot/widgetjs.cn/hotspot/widget.json" 6 | }, 7 | { 8 | "pattern": "./dist/widget_*.zip", 9 | "dest": "/www/wwwroot/widgetjs.cn/hotspot/widget.zip" 10 | } 11 | ], 12 | "ftpConfig": { 13 | "host": ["mine"] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/widgets/zhihu/ZhihuWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import ZhihuWidgetDefine from '@/widgets/zhihu/Zhihu.widget' 2 | 3 | const ZhihuWidgetRoutes = [ 4 | { 5 | path: ZhihuWidgetDefine.path, 6 | name: `${ZhihuWidgetDefine.name}`, 7 | component: () => import(/* webpackChunkName: "cn.widgetjs.widgets.zhihu" */ './ZhihuWidgetView.vue'), 8 | }, 9 | ] 10 | export default ZhihuWidgetRoutes 11 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import { WidgetJsPlugin } from '@widget-js/vue3' 3 | import dayjs from 'dayjs' 4 | import App from './App.vue' 5 | import router from './router' 6 | import '@widget-js/vue3/dist/style.css' 7 | import 'dayjs/locale/zh-cn' 8 | import 'virtual:uno.css' 9 | 10 | dayjs.locale('zh-cn') 11 | createApp(App).use(WidgetJsPlugin).use(router).mount('body') 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | storybook-static 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | 25 | #Electron-builder output 26 | /dist_electron 27 | /dist 28 | -------------------------------------------------------------------------------- /src/widgets/weibo/WeiBoWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import WeiBoWidgetDefine from './WeiBo.widget' 2 | 3 | const url = WeiBoWidgetDefine.path 4 | const name = WeiBoWidgetDefine.name 5 | 6 | const WeiBoWidgetRoutes = [ 7 | { 8 | path: url, 9 | name: `${name}`, 10 | component: () => import(/* webpackChunkName: "com.wisdom.widgets.wei_bo" */ './WeiBoWidgetView.vue'), 11 | }, 12 | ] 13 | 14 | export default WeiBoWidgetRoutes 15 | -------------------------------------------------------------------------------- /src/widgets/douyin/DouyinWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import DouyinWidgetDefine from './Douyin.widget' 2 | 3 | const url = DouyinWidgetDefine.path 4 | const name = DouyinWidgetDefine.name 5 | 6 | const DouyinWidgetRoutes = [ 7 | { 8 | path: url, 9 | name: `${name}`, 10 | component: () => import(/* webpackChunkName: "com.wisdom.widgets.douyin" */ './DouyinWidgetView.vue'), 11 | }, 12 | ] 13 | 14 | export default DouyinWidgetRoutes 15 | -------------------------------------------------------------------------------- /src/widgets/tou-tiao/TouTiaoWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router' 2 | import TouTiaoWidget from './TouTiao.widget' 3 | 4 | const path = TouTiaoWidget.path 5 | const name = TouTiaoWidget.name 6 | 7 | const TouTiaoWidgetRoutes: RouteRecordRaw[] = [ 8 | { 9 | path, 10 | name: `${name}`, 11 | component: () => import('./TouTiaoWidgetView.vue'), 12 | }, 13 | ] 14 | 15 | export default TouTiaoWidgetRoutes 16 | -------------------------------------------------------------------------------- /src/widgets/bangumi/BangumiWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import BangumiWidgetDefine from './Bangumi.widget' 2 | 3 | const url = BangumiWidgetDefine.path 4 | const name = BangumiWidgetDefine.name 5 | 6 | const BangumiWidgetRoutes = [ 7 | { 8 | path: url, 9 | name: `${name}`, 10 | component: () => import(/* webpackChunkName: "cn.widgetjs.widgets.hotspot.bangumi" */ './BangumiWidgetView.vue'), 11 | }, 12 | ] 13 | 14 | export default BangumiWidgetRoutes 15 | -------------------------------------------------------------------------------- /src/widgets/bilibili/BilibiliWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import BilibiliWidgetDefine from './Bilibili.widget' 2 | 3 | const url = BilibiliWidgetDefine.path 4 | const name = BilibiliWidgetDefine.name 5 | 6 | const BilibiliWidgetRoutes = [ 7 | { 8 | path: url, 9 | name: `${name}`, 10 | component: () => import(/* webpackChunkName: "com.wisdom.widgets.bilibili" */ './BilibiliWidgetView.vue'), 11 | }, 12 | ] 13 | 14 | export default BilibiliWidgetRoutes 15 | -------------------------------------------------------------------------------- /src/widgets/cls-telegraph/ClsTelegraphWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router' 2 | import ClsTelegraphWidget from './ClsTelegraph.widget' 3 | 4 | const path = ClsTelegraphWidget.path 5 | const name = ClsTelegraphWidget.name 6 | 7 | const ClsTelegraphWidgetRoutes: RouteRecordRaw[] = [ 8 | { 9 | path, 10 | name: `${name}`, 11 | component: () => import('./ClsTelegraphWidgetView.vue'), 12 | }, 13 | ] 14 | 15 | export default ClsTelegraphWidgetRoutes 16 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue'; 4 | const component: DefineComponent<{}, {}, any>; 5 | export default component; 6 | } 7 | declare module '*.png' { 8 | const value: string; 9 | export default value; 10 | } 11 | declare module 'colorthief' { 12 | type Color = [number, number, number]; 13 | export default class ColorThief { 14 | getColor: (img: HTMLImageElement | null) => Color; 15 | getPalette: (img: HTMLImageElement | null) => Color[]; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /components.d.ts: -------------------------------------------------------------------------------- 1 | // generated by unplugin-vue-components 2 | // We suggest you to commit this file into source control 3 | // Read more: https://github.com/vuejs/core/pull/3399 4 | import '@vue/runtime-core' 5 | 6 | export {} 7 | 8 | declare module '@vue/runtime-core' { 9 | export interface GlobalComponents { 10 | ElAvatar: typeof import('element-plus/es')['ElAvatar'] 11 | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] 12 | RouterLink: typeof import('vue-router')['RouterLink'] 13 | RouterView: typeof import('vue-router')['RouterView'] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/widgets/bilibili-rcmd/BilibiliRcmdWidgetRoutes.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router' 2 | import BilibiliRcmdWidget from './BilibiliRcmd.widget' 3 | 4 | const path = BilibiliRcmdWidget.path 5 | const name = BilibiliRcmdWidget.name 6 | 7 | const BilibiliRcmdWidgetRoutes: RouteRecordRaw[] = [ 8 | { 9 | path, 10 | name: `${name}`, 11 | component: () => 12 | import( 13 | /* webpackChunkName: "cn.widgetjs.widgets.hotspot.bilibili_rcmd" */ './BilibiliRcmdWidgetView.vue' 14 | ), 15 | }, 16 | ] 17 | 18 | export default BilibiliRcmdWidgetRoutes 19 | -------------------------------------------------------------------------------- /src/widgets/tou-tiao/TouTiao.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | const TouTiaoWidget = new Widget({ 4 | name: '.tou_tiao', 5 | title: { 'zh-CN': '头条热榜' }, 6 | description: { 'zh-CN': '今日头条热度榜单' }, 7 | keywords: [WidgetKeyword.RECOMMEND], 8 | categories: ['news'], 9 | lang: 'zh-CN', 10 | width: 4, 11 | height: 4, 12 | minWidth: 4, 13 | maxWidth: 6, 14 | minHeight: 4, 15 | maxHeight: 6, 16 | previewImage: '/images/preview_toutiao.png', 17 | path: '/widget/tou_tiao', 18 | configPagePath: undefined, 19 | }) 20 | 21 | export default TouTiaoWidget 22 | -------------------------------------------------------------------------------- /src/widgets/cls-telegraph/ClsTelegraph.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | const ClsTelegraphWidget = new Widget({ 4 | name: '.cls_telegraph', 5 | title: { 'zh-CN': '财联社电报' }, 6 | description: { 'zh-CN': '每5分钟刷新一次' }, 7 | keywords: [WidgetKeyword.RECOMMEND], 8 | categories: ['finance', 'news'], 9 | lang: 'zh-CN', 10 | width: 4, 11 | height: 4, 12 | minWidth: 4, 13 | maxWidth: 6, 14 | minHeight: 4, 15 | maxHeight: 6, 16 | previewImage: '/images/preview_cls_telegraph.png', 17 | path: '/widget/cls_telegraph', 18 | configPagePath: undefined, 19 | }) 20 | 21 | export default ClsTelegraphWidget 22 | -------------------------------------------------------------------------------- /src/widgets/weibo/model/WeiBoModel.ts: -------------------------------------------------------------------------------- 1 | export interface WeiBoModel { 2 | raw_hot: number 3 | is_fei: number 4 | icon_desc: string 5 | word: string 6 | channel_type: string 7 | label_name: string 8 | small_icon_desc: string 9 | small_icon_desc_color: string 10 | subject_label: string 11 | emoticon: string 12 | flag: number 13 | ad_info: string 14 | category: string 15 | note: string 16 | topic_flag: number 17 | star_word: number 18 | fun_word: number 19 | subject_querys: string 20 | mid: string 21 | realpos: number 22 | num: number 23 | onboard_time: number 24 | icon_desc_color: string 25 | expand: number 26 | word_scheme: string 27 | rank: number 28 | } 29 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw, 2 | } from 'vue-router' 3 | import { 4 | createRouter, 5 | createWebHashHistory, 6 | } from 'vue-router' 7 | import WidgetRouter from '@/widgets/widget-router' 8 | 9 | /** 10 | * 组件路由都以 /widget/开头,e.g. /widget/countdown 11 | * 组件设置路由都以 /widget/config/开头,e.g. /widget/config/countdown 12 | * webpackChunkName: 和路由名称保持一致 13 | */ 14 | const routes: Array = [ 15 | ...WidgetRouter, 16 | { 17 | path: '/', 18 | name: 'Index', 19 | component: () => import(/* webpackChunkName: "index" */ '../LandingPage.vue'), 20 | }, 21 | ] 22 | 23 | const router = createRouter({ 24 | history: createWebHashHistory(), 25 | routes, 26 | }) 27 | export default router 28 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 热点组件 8 | 9 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/widgets/bilibili-rcmd/BilibiliRcmd.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | const BilibiliRcmdWidget = new Widget({ 4 | name: 'cn.widgetjs.widgets.hotspot.bilibili_rcmd', 5 | previewImage: '/images/preview_bilibili_rcmd.png', 6 | title: { 'zh-CN': 'B站推荐', 'en-US': 'Bilibili Recommend' }, 7 | description: { 'zh-CN': '实时获取B站推荐视频,发现更多精彩内容', 'en-US': 'Discover more exciting content' }, 8 | keywords: [WidgetKeyword.RECOMMEND], 9 | categories: ['news'], 10 | lang: 'zh-CN', 11 | width: 4, 12 | height: 4, 13 | minWidth: 4, 14 | maxWidth: 6, 15 | minHeight: 4, 16 | maxHeight: 6, 17 | path: '/widget/bilibili_rcmd', 18 | socialLinks: [ 19 | { name: 'github', link: 'https://github.com/widget-js/hotspot' }, 20 | ], 21 | }) 22 | 23 | export default BilibiliRcmdWidget 24 | -------------------------------------------------------------------------------- /src/widgets/bangumi/model/BangumiResult.ts: -------------------------------------------------------------------------------- 1 | export interface BangumiSeason { 2 | cover: string 3 | delay: number 4 | ep_id: number 5 | favorites: number 6 | follow: number 7 | is_published: number 8 | pub_index: string 9 | pub_time: string 10 | pub_ts: number 11 | season_id: number 12 | season_status: number 13 | square_cover: string 14 | title: string 15 | url: string 16 | } 17 | 18 | export interface BangumiResultItem { 19 | date: string 20 | date_ts: number 21 | day_of_week: number 22 | is_today: number 23 | seasons: BangumiSeason[] 24 | /** 25 | * 这个不是B站返回的字段 26 | */ 27 | weekday?: string 28 | /** 29 | * 这个不是B站返回的字段 30 | */ 31 | dayOfMonth?: number 32 | } 33 | 34 | export interface BangumiResult { 35 | code: number 36 | message: string 37 | result: BangumiResultItem[] 38 | } 39 | -------------------------------------------------------------------------------- /widget.package.ts: -------------------------------------------------------------------------------- 1 | import { WidgetPackage } from '@widget-js/core' 2 | 3 | export default new WidgetPackage({ 4 | remote: { 5 | entry: 'https://widgetjs.cn/hotspot', 6 | hash: true, 7 | base: '/hotspot', 8 | hostname: 'widgetjs.cn', 9 | }, 10 | author: 'Neo Fu', 11 | description: { 12 | 'zh-CN': '包含知乎、B站、抖音、微博等平台的热搜组件。', 13 | }, 14 | entry: 'index.html', 15 | hash: true, 16 | homepage: 'https://widgetjs.cn', 17 | name: 'cn.widgetjs.widgets.hotspot', 18 | remoteEntry: 'https://widgetjs.cn/hotspot', 19 | remotePackage: 'https://widgetjs.cn/hotspot/widget.json', 20 | zipUrl: 'https://widgetjs.cn/hotspot/widget.zip', 21 | title: { 22 | 'zh-CN': '全网热点组件', 23 | }, 24 | devOptions: { 25 | folder: './src/widgets/', 26 | route: true, 27 | devUrl: 'http://localhost:5173/hotspot', 28 | }, 29 | }) 30 | -------------------------------------------------------------------------------- /src/widget.package.ts: -------------------------------------------------------------------------------- 1 | import { WidgetPackage } from '@widget-js/core' 2 | 3 | const widgetPackage = new WidgetPackage({ 4 | remote: { 5 | hostname: 'widgetjs.cn', 6 | entry: 'https://rtugeek.gitee.io/hotspot', 7 | hash: true, 8 | base: '/hotspot', 9 | }, 10 | author: 'Neo Fu', 11 | description: { 12 | 'zh-CN': '包含知乎、B站、抖音、微博等平台的热搜组件。', 13 | }, 14 | entry: 'index.html', 15 | hash: true, 16 | homepage: 'https://widgetjs.cn', 17 | name: 'cn.widgetjs.widgets.hotspot', 18 | remoteEntry: 'https://rtugeek.gitee.io/hotspot', 19 | remotePackage: 'https://rtugeek.gitee.io/hotspot/widget.json', 20 | title: { 21 | 'zh-CN': '全网热点组件', 22 | }, 23 | version: '1.1.0', 24 | devOptions: { 25 | folder: './src/widgets/', 26 | route: true, 27 | devUrl: 'http://localhost:5173/hotspot', 28 | }, 29 | }) 30 | export default widgetPackage 31 | -------------------------------------------------------------------------------- /src/widgets/douyin/model/DouyinModel.ts: -------------------------------------------------------------------------------- 1 | export interface DouyinModel { 2 | position: number 3 | word: string 4 | /** 5 | * 0-无 1-新 3-热 5-首发 8-独家 爆、挑战、同城、直播热点、 6 | */ 7 | label: 0 8 | hot_value: number 9 | } 10 | 11 | export interface Label { 12 | label: number 13 | title: string 14 | backgroundColor?: string 15 | } 16 | 17 | export const DouyinLabels: Label[] = [ 18 | { 19 | label: 0, 20 | title: '', 21 | }, 22 | { 23 | label: 1, 24 | title: '新', 25 | backgroundColor: '#c757d8', 26 | }, 27 | { 28 | label: 3, 29 | title: '热', 30 | backgroundColor: '#ff1f52', 31 | }, 32 | { 33 | label: 5, 34 | title: '首发', 35 | backgroundColor: '#fd39d0', 36 | }, 37 | { 38 | label: 8, 39 | title: '独家', 40 | backgroundColor: '#fc2eba', 41 | }, 42 | { 43 | label: 9, 44 | title: '', 45 | }, 46 | ] 47 | -------------------------------------------------------------------------------- /src/widgets/douyin/Douyin.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | const name = 'cn.widgetjs.widgets.hotspot.douyin' 4 | // 组件标题 5 | const title = { 'zh-CN': '抖音热榜' } 6 | // 组件描述 7 | const description = { 'zh-CN': '抖音热榜' } 8 | // 组件关键词 9 | const keywords = [WidgetKeyword.RECOMMEND] 10 | // 组件路由地址 11 | const path = '/widget/douyin' 12 | // 组件关键词 13 | const DouyinWidgetDefine = new Widget({ 14 | name, 15 | title, 16 | description, 17 | keywords, 18 | categories: ['news'], 19 | lang: 'zh-CN', 20 | width: 4, 21 | height: 3, 22 | previewImage: '/images/preview_douyin.png', 23 | minWidth: 4, 24 | maxWidth: 6, 25 | minHeight: 3, 26 | maxHeight: 6, 27 | path, 28 | routes: [ 29 | { 30 | url: path, 31 | name: 'index', 32 | }, 33 | ], 34 | socialLinks: [ 35 | { name: 'github', link: 'https://github.com/widget-js/hotspot' }, 36 | ], 37 | }) 38 | 39 | export default DouyinWidgetDefine 40 | -------------------------------------------------------------------------------- /src/widgets/weibo/WeiBo.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | const name = 'ccn.widgetjs.widgets.hotspot.weibo' 4 | // 组件标题 5 | const title = { 'zh-CN': '微博热搜' } 6 | // 组件描述 7 | const description = { 'zh-CN': '微博热搜' } 8 | // 组件关键词 9 | const keywords = [WidgetKeyword.RECOMMEND] 10 | // 组件路由地址 11 | const path = '/widget/weibo' 12 | // 组件关键词 13 | const WeiBoWidgetDefine = new Widget({ 14 | name, 15 | title, 16 | description, 17 | keywords, 18 | lang: 'zh-CN', 19 | categories: ['news'], 20 | width: 4, 21 | height: 3, 22 | previewImage: '/images/weibo_hot_search.png', 23 | minWidth: 4, 24 | maxWidth: 6, 25 | minHeight: 3, 26 | maxHeight: 6, 27 | disabled: true, 28 | path, 29 | routes: [ 30 | { 31 | url: path, 32 | name: 'index', 33 | }, 34 | ], 35 | socialLinks: [ 36 | { name: 'github', link: 'https://github.com/widget-js/hotspot' }, 37 | ], 38 | }) 39 | 40 | export default WeiBoWidgetDefine 41 | -------------------------------------------------------------------------------- /src/widgets/bilibili/Bilibili.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | const name = 'cn.widgetjs.widgets.hotspot.bilibili' 4 | // 组件标题 5 | const title = { 'zh-CN': 'bilibili热搜' } 6 | // 组件描述 7 | const description = { 'zh-CN': '看看年轻人在B站搜什么' } 8 | // 组件关键词 9 | const keywords = [WidgetKeyword.RECOMMEND] 10 | // 组件路由地址 11 | const path = '/widget/bilibili' 12 | // 组件关键词 13 | const BilibiliWidgetDefine = new Widget({ 14 | name, 15 | title, 16 | description, 17 | categories: ['news'], 18 | keywords, 19 | lang: 'zh-CN', 20 | width: 4, 21 | height: 3, 22 | previewImage: '/images/bilibili_hot_search.png', 23 | minWidth: 4, 24 | maxWidth: 6, 25 | minHeight: 3, 26 | maxHeight: 6, 27 | path, 28 | routes: [ 29 | { 30 | url: path, 31 | name: 'index', 32 | }, 33 | ], 34 | socialLinks: [ 35 | { name: 'github', link: 'https://github.com/widget-js/hotspot' }, 36 | ], 37 | }) 38 | 39 | export default BilibiliWidgetDefine 40 | -------------------------------------------------------------------------------- /src/widgets/bangumi/Bangumi.widget.ts: -------------------------------------------------------------------------------- 1 | import { Widget, WidgetKeyword } from '@widget-js/core' 2 | 3 | // TODO 修改组件信息,标题,描述,关键词 4 | const name = 'cn.widgetjs.widgets.hotspot.bangumi' 5 | // 组件标题 6 | const title = { 'zh-CN': 'B站新番时间表' } 7 | // 组件描述 8 | const description = { 'zh-CN': '追番小助手' } 9 | // 组件关键词 10 | const keywords = [WidgetKeyword.RECOMMEND] 11 | // 组件路由地址 12 | const path = '/widget/bangumi' 13 | // 组件关键词 14 | const BangumiWidgetDefine = new Widget({ 15 | name, 16 | title, 17 | description, 18 | keywords, 19 | lang: 'zh-CN', 20 | categories: ['news'], 21 | width: 4, 22 | height: 4, 23 | minWidth: 4, 24 | maxWidth: 6, 25 | minHeight: 4, 26 | maxHeight: 4, 27 | previewImage: '/images/preview_bangumi.png', 28 | path, 29 | routes: [ 30 | { 31 | url: path, 32 | name: 'index', 33 | }, 34 | ], 35 | socialLinks: [ 36 | { name: 'github', link: 'https://github.com/widget-js/hotspot' }, 37 | ], 38 | }) 39 | 40 | export default BangumiWidgetDefine 41 | -------------------------------------------------------------------------------- /src/widgets/widget-router.ts: -------------------------------------------------------------------------------- 1 | import BilibiliWidgetRoutes from './bilibili/BilibiliWidgetRoutes' 2 | import WeiBoWidgetRoutes from './weibo/WeiBoWidgetRoutes' 3 | import DouyinWidgetRoutes from './douyin/DouyinWidgetRoutes' 4 | import BangumiWidgetRoutes from './bangumi/BangumiWidgetRoutes' 5 | import BilibiliRcmdWidgetRoutes from './bilibili-rcmd/BilibiliRcmdWidgetRoutes' 6 | import ClsTelegraphWidgetRoutes from './cls-telegraph/ClsTelegraphWidgetRoutes' 7 | import TouTiaoWidgetRoutes from './tou-tiao/TouTiaoWidgetRoutes' 8 | import ZhihuWidgetRoutes from '@/widgets/zhihu/ZhihuWidgetRoutes' 9 | 10 | // FBI WANING! IMPORT PLACE, DONT DELETE THIS LINE 11 | 12 | const WidgetRouter = [ 13 | ...ZhihuWidgetRoutes, 14 | ...BilibiliWidgetRoutes, 15 | ...WeiBoWidgetRoutes, 16 | ...DouyinWidgetRoutes, 17 | ...BangumiWidgetRoutes, 18 | ...BilibiliRcmdWidgetRoutes, 19 | ...ClsTelegraphWidgetRoutes, 20 | ...TouTiaoWidgetRoutes, 21 | // FBI WANING! ROUTE PLACE, DONT DELETE THIS LINE 22 | ] 23 | export default WidgetRouter 24 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path' 2 | import { defineConfig } from 'vite' 3 | import vue from '@vitejs/plugin-vue' 4 | import AutoImport from 'unplugin-auto-import/vite' 5 | import Components from 'unplugin-vue-components/vite' 6 | import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' 7 | import widget from '@widget-js/vite-plugin-widget' 8 | import UnoCSS from 'unocss/vite' 9 | // https://vitejs.dev/config/ 10 | export default defineConfig(({ mode }) => { 11 | const isOffline = mode == 'offline' 12 | const base = isOffline ? './' : '/hotspot/' 13 | return { 14 | base, 15 | plugins: [ 16 | vue(), 17 | UnoCSS(), 18 | widget({ generateFullNamePackage: true, generateZip: isOffline }), 19 | AutoImport({ 20 | resolvers: [ElementPlusResolver()], 21 | }), 22 | Components({ 23 | resolvers: [ElementPlusResolver()], 24 | }), 25 | ], 26 | resolve: { 27 | alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }], 28 | }, 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /src/widgets/zhihu/Zhihu.widget.ts: -------------------------------------------------------------------------------- 1 | import type { LanguageCode, LanguageTextMap } from '@widget-js/core' 2 | import { Widget, WidgetKeyword } from '@widget-js/core' 3 | 4 | const name = 'cn.widgetjs.widgets.hotspot.zhihu' 5 | const title: LanguageTextMap = { 'zh-CN': '知乎' } 6 | // 组件标题 7 | const description: LanguageTextMap = { 'zh-CN': '知乎热榜与日报' } 8 | // 组件描述 9 | // 组件关键词 10 | const keywords = [WidgetKeyword.RECOMMEND] 11 | const lang: LanguageCode = 'zh-CN' 12 | const path = '/widget/zhihu' 13 | const width = 4 14 | const height = 3 15 | const minWidth = 4 16 | const minHeight = 3 17 | const maxHeight = 4 18 | const ZhihuWidgetDefine = new Widget({ 19 | previewImage: '/images/preview_zhihu.png', 20 | name, 21 | title, 22 | description, 23 | keywords, 24 | lang, 25 | width, 26 | disabled: true, 27 | height, 28 | maxWidth: 6, 29 | maxHeight, 30 | minWidth, 31 | categories: ['news'], 32 | minHeight, 33 | path, 34 | socialLinks: [ 35 | { name: 'github', link: 'https://github.com/widget-js/hotspot' }, 36 | ], 37 | }) 38 | 39 | export default ZhihuWidgetDefine 40 | -------------------------------------------------------------------------------- /.github/workflows/github-page.yml: -------------------------------------------------------------------------------- 1 | name: Deploy CI 2 | permissions: 3 | id-token: write 4 | pages: write 5 | 6 | on: 7 | push: 8 | branches: [ "master" ] 9 | pull_request: 10 | branches: [ "master" ] 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | - name: Use Node.js 19 | uses: actions/setup-node@v4 20 | with: 21 | node-version: '18.x' 22 | - name: Build static files 23 | id: build 24 | run: | 25 | npm install 26 | npm run build 27 | - name: Upload static files as artifact 28 | id: deployment 29 | uses: actions/upload-pages-artifact@v3 30 | with: 31 | path: dist/ 32 | 33 | deploy: 34 | environment: 35 | name: github-pages 36 | url: ${{ steps.deployment.outputs.page_url }} 37 | runs-on: ubuntu-latest 38 | needs: build 39 | steps: 40 | - name: Deploy to GitHub Pages 41 | id: deployment 42 | uses: actions/deploy-pages@v4 43 | -------------------------------------------------------------------------------- /src/BubblyButton.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 19 | 20 | 51 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "jsx": "preserve", 5 | "lib": [ 6 | "esnext", 7 | "dom", 8 | "dom.iterable", 9 | "scripthost" 10 | ], 11 | "useDefineForClassFields": true, 12 | "emitDecoratorMetadata": true, 13 | "experimentalDecorators": true, 14 | "baseUrl": ".", 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "paths": { 18 | "@/*": [ 19 | "src/*" 20 | ] 21 | }, 22 | "resolveJsonModule": true, 23 | "types": [ 24 | "webpack-env", 25 | "jest", 26 | "element-plus/global" 27 | ], 28 | "strict": true, 29 | "noImplicitAny": false, 30 | "noImplicitThis": false, 31 | "noEmit": true, 32 | "removeComments": true, 33 | "sourceMap": true, 34 | "allowSyntheticDefaultImports": true, 35 | "esModuleInterop": true, 36 | "forceConsistentCasingInFileNames": true, 37 | "skipLibCheck": true 38 | }, 39 | "include": [ 40 | "src/**/*.ts", 41 | "src/**/*.tsx", 42 | "src/**/*.vue", 43 | "src/**/*.widget.ts", 44 | "src/**/*.stories.ts", 45 | "tests/**/*.ts", 46 | "tests/**/*.tsx", 47 | "auto-imports.d.ts" 48 | ], 49 | "exclude": [ 50 | "node_modules" 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /src/common/css/common.css: -------------------------------------------------------------------------------- 1 | body *, 2 | page view { 3 | box-sizing: border-box; 4 | flex-shrink: 0; 5 | user-select: none; 6 | } 7 | 8 | body { 9 | font-family: Roboto, Helvetica Neue, Helvetica, Tahoma, Arial, PingFang SC-Light, Microsoft YaHei; 10 | margin: 0; 11 | overflow: hidden; 12 | } 13 | 14 | button { 15 | margin: 0; 16 | padding: 0; 17 | border: 1px solid transparent; 18 | outline: none; 19 | background-color: transparent; 20 | } 21 | 22 | button:active { 23 | opacity: 0.6; 24 | } 25 | 26 | .flex { 27 | display: flex; 28 | } 29 | 30 | .flex-col { 31 | display: flex; 32 | flex-direction: column; 33 | } 34 | 35 | .flex-row { 36 | display: flex; 37 | flex-direction: row; 38 | } 39 | 40 | .justify-start { 41 | display: flex; 42 | justify-content: flex-start; 43 | } 44 | 45 | .justify-center { 46 | display: flex; 47 | justify-content: center; 48 | } 49 | 50 | .justify-end { 51 | display: flex; 52 | justify-content: flex-end; 53 | } 54 | 55 | .justify-evenly { 56 | display: flex; 57 | justify-content: space-evenly; 58 | } 59 | 60 | .justify-around { 61 | display: flex; 62 | justify-content: space-around; 63 | } 64 | 65 | .justify-between { 66 | display: flex; 67 | justify-content: space-between; 68 | } 69 | 70 | .align-start { 71 | display: flex; 72 | align-items: flex-start; 73 | } 74 | 75 | .align-center { 76 | display: flex; 77 | align-items: center; 78 | } 79 | 80 | .align-end { 81 | display: flex; 82 | align-items: flex-end; 83 | } 84 | -------------------------------------------------------------------------------- /src/widgets/zhihu/model/ZhihuModel.ts: -------------------------------------------------------------------------------- 1 | export class ZhihuModel { 2 | title: string 3 | url: string 4 | hot: string 5 | 6 | constructor(title: string, url: string, hot: string) { 7 | this.title = title 8 | this.url = url 9 | this.hot = hot?.replace('热度', '') 10 | } 11 | } 12 | 13 | export class ZhihuConvert { 14 | static news2Model(list: ZhihuNews[]): ZhihuModel[] { 15 | return list.map((news) => { 16 | return new ZhihuModel(news.title, news.url, '') 17 | }) 18 | } 19 | 20 | static hot2Model(list: ZhihuHot[]): ZhihuModel[] { 21 | return list.map((news) => { 22 | return new ZhihuModel(news.target.title, news.target.url, news.detail_text) 23 | }) 24 | } 25 | } 26 | 27 | interface ZhihuHot { 28 | attached_info: string 29 | card_id: string 30 | children: [] 31 | debut: boolean 32 | detail_text: string 33 | id: string 34 | style_type: string 35 | target: ZhihuHotTarget 36 | trend: number 37 | // hot_list_feed 38 | type: string 39 | } 40 | 41 | interface ZhihuHotTarget { 42 | answer_count: number 43 | author: string 44 | bound_topic_ids: [] 45 | comment_count: number 46 | created: number 47 | excerpt: string 48 | follower_count: number 49 | id: number 50 | is_following: boolean 51 | title: string 52 | type: string 53 | url: string 54 | } 55 | 56 | interface ZhihuNews { 57 | ga_prefix: string 58 | hint: string 59 | id: string 60 | image_hue: string 61 | images: [] 62 | title: string 63 | type: number 64 | url: string 65 | } 66 | -------------------------------------------------------------------------------- /src/widgets/components/HotspotBox.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 28 | 29 | 60 | -------------------------------------------------------------------------------- /src/api/BilibiliApi.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | // 视频数据接口 4 | interface BilibiliVideoItem { 5 | id: number 6 | bvid: string 7 | cid: number 8 | goto: string 9 | uri: string 10 | pic: string 11 | title: string 12 | duration: number 13 | pubdate: number 14 | owner: { 15 | mid: number 16 | name: string 17 | face: string 18 | } 19 | stat: { 20 | view: number 21 | like: number 22 | danmaku: number 23 | vt: number 24 | } 25 | } 26 | 27 | // API响应接口 28 | interface BilibiliApiResponse { 29 | code: number 30 | message: string 31 | ttl: number 32 | data: { 33 | item: BilibiliVideoItem[] 34 | } 35 | } 36 | 37 | export class BilibiliApi { 38 | private static readonly BASE_URL = 'https://api.bilibili.com' 39 | 40 | /** 41 | * 获取推荐视频列表 42 | * @returns Promise 43 | */ 44 | public static async getRecommendedVideos(lasstShowList: string[] = []): Promise { 45 | try { 46 | const path = 'brush=4&homepage_ver=1&ps=10&last_y_num=5' 47 | const response = await axios.get( 48 | `${this.BASE_URL}/x/web-interface/wbi/index/top/feed/rcmd?${path}`, 49 | { 50 | params: { 51 | last_show_list: lasstShowList.join(','), 52 | w_ts: Math.floor(Date.now() / 1000), 53 | fresh_idx: Math.floor(Date.now() / 1000), 54 | }, 55 | }, 56 | ) 57 | 58 | if (response.data.code === 0) { 59 | return response.data.data.item 60 | } 61 | else { 62 | throw new Error(`Bilibili API Error: ${response.data.message}`) 63 | } 64 | } 65 | catch (error) { 66 | console.error('Failed to fetch Bilibili recommended videos:', error) 67 | throw error 68 | } 69 | } 70 | } 71 | 72 | export type { BilibiliVideoItem } 73 | -------------------------------------------------------------------------------- /src/widgets/components/HotspotItem.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 46 | 47 | 80 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import antfu from '@antfu/eslint-config' 2 | 3 | export default antfu({ 4 | ignores: ['**/*.md', '**/*.md/*.*', 'dist/', 'public/', '**/dist/**/', 'node_modules', '**/node_modules/**', 'node_modules/', '**/node_modules/**/', 'patches/', '**/patches/**/', 'types/', '**/types/**/', 'cache/', '**/cache/**/', '!packages/.vitepress', '!packages/.vitepress/**', '!.eslintrc.js', '!.eslintrc.js/**', '!rollup.config.js', '!rollup.config.js/**', '!.test', '!**/.test/**', '.temp', '**/.temp/**'], 5 | }, { 6 | rules: { 7 | 'vue/no-deprecated-functional-template': 'off', 8 | 'vue/one-component-per-file': 'off', 9 | 'vue/no-template-shadow': 'off', 10 | 'vue/require-prop-types': 'off', 11 | 'vue/dot-location': 'off', 12 | 'spaced-comment': ['error', 'always', { exceptions: ['#__PURE__'] }], 13 | 'no-restricted-imports': [ 14 | 'error', 15 | { 16 | patterns: ['../**/core', '../**/vue3'], 17 | }, 18 | ], 19 | 'vue/eqeqeq': 'off', 20 | 'vue/space-unary-ops': 'off', 21 | 'vue/comma-dangle': ['error', 'only-multiline'], 22 | 'node/no-callback-literal': 'off', 23 | 'import/namespace': 'off', 24 | 'eqeqeq': 'off', 25 | 'import/default': 'off', 26 | 'import/no-named-as-default': 'off', 27 | 'import/no-named-as-default-member': 'off', 28 | 'curly': ['error', 'multi-line'], 29 | 'max-statements-per-line': ['error', { 30 | max: 1, 31 | }], 32 | }, 33 | }, { 34 | files: ['demo.vue', 'demo.client.vue', 'scripts/*.ts', '**/*.test.ts'], 35 | rules: { 36 | 'no-alert': 'off', 37 | 'no-console': 'off', 38 | 'no-undef': 'off', 39 | 'no-unused-vars': 'off', 40 | 'no-restricted-imports': 'off', 41 | '@typescript-eslint/no-unused-vars': 'off', 42 | '@typescript-eslint/no-redeclare': 'off', 43 | 'unused-imports/no-unused-vars': 'off', 44 | }, 45 | }) 46 | -------------------------------------------------------------------------------- /src/widgets/cls-telegraph/ClsTelegraphWidgetView.vue: -------------------------------------------------------------------------------- 1 | 44 | 45 | 67 | 68 | 70 | -------------------------------------------------------------------------------- /src/widgets/tou-tiao/TouTiaoWidgetView.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 69 | 70 | 72 | -------------------------------------------------------------------------------- /src/widgets/weibo/images/weibo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Widgets - Capable and ergonomic widgets. 4 | 5 |
6 | 桌面组件 - 全网热搜组件包 7 |

8 | 9 |

10 | 11 | Chat 12 | 13 | ![png](screenshot.jpg) 14 | 15 | ### 说明 16 | 17 | 这是桌面组件热搜组件包源码,包含知乎、bilibili、抖音、微博等平台的热搜组件。 18 | 全部开源组件仓库在这:https://github.com/widget-js/widgets 19 | 20 | ### Windows 10/11 客户端下载 21 | 22 | - https://www.microsoft.com/store/productId/9NPR50GQ7T53 23 | - 或 24 | - https://widgetjs.cn 25 | 26 | ### 项目目录结构 27 | 28 | ``` 29 | widgets 30 | ├── src 31 | │ ├── components // 常用Vue组件 32 | │ ├── views // 33 | │ ├── widgets // 桌面组件文件 34 | │ │ └── countdown // 每个桌面组件一个文件夹 35 | │ │ ├── XXWidget.vue // 桌面小组件 36 | │ │ └── XXConfig.vue // 小组件配置页面 37 | │ │ └── XXView.vue // 小组件页面 38 | │ └── index.ts 39 | ├── .gitignore 40 | ├── package.json 41 | ├── README.md 42 | └── tsconfig.json 43 | ``` 44 | 45 | ### 运行项目 46 | #### 1.下载并运行桌面组件客户端 47 | - https://www.microsoft.com/store/productId/9NPR50GQ7T53 48 | - 或 49 | - https://widgetjs.cn 50 | 51 | #### 2.克隆代码 52 | 53 | ```shell 54 | #克隆代码 55 | git clone https://github.com/widget-js/hotspot.git 56 | ``` 57 | #### 3.到项目目录下载依赖 58 | ```shell 59 | pnpm install 60 | ``` 61 | #### 4.运行 62 | ```shell 63 | pnpm serve 64 | ``` 65 | 66 | ### 创建自己的组件 67 | 68 | ```shell 69 | pnpm widget create 70 | ``` 71 | 72 | ### 组件列表 73 | 74 | #### 知乎热榜 75 | 76 | ![png](public/images/preview_zhihu.png) 77 | 78 | - 代码路径:/widgets/zhihu 79 | - 组件路由:/widget/zhihu 80 | 81 | #### bilibili热榜 82 | 83 | ![png](public/images/bilibili_hot_search.png) 84 | 85 | - 代码路径:/widgets/bilibili 86 | - 组件路由:/widget/bilibili 87 | 88 | 89 | 90 | #### 微博热榜 91 | 92 | ![png](public/images/weibo_hot_search.png) 93 | 94 | - 代码路径:/widgets/weibo 95 | - 组件路由:/widget/weibo 96 | 97 | 98 | #### 抖音热榜 99 | ![png](public/images/preview_douyin.png) 100 | - 代码路径:/widgets/douyin 101 | - 组件路由:/widget/douyin 102 | -------------------------------------------------------------------------------- /src/widgets/bilibili/BilibiliWidget.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 62 | 63 | 88 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@widget-js/hotspot", 3 | "type": "module", 4 | "version": "1.8.0", 5 | "private": true, 6 | "author": "Widget JS", 7 | "license": "MIT", 8 | "scripts": { 9 | "serve": "vite", 10 | "build": "vite build", 11 | "build:offline": "vite build --mode offline", 12 | "preview": "vite preview", 13 | "update:widgetjs": "widget dependencies -t remote && pnpm install", 14 | "local": "widget dependencies -t local && pnpm install", 15 | "release": "widget release -t ftp", 16 | "release:offline": "widget release -t ftp -f release-offline.json", 17 | "lint": "eslint --cache .", 18 | "lint:fix": "eslint --cache . --fix" 19 | }, 20 | "dependencies": { 21 | "@vueuse/core": "^12.4.0", 22 | "@widget-js/core": "^24.1.1-beta.75", 23 | "@widget-js/vue3": "^24.1.1-beta.74", 24 | "axios": "^1.1.3", 25 | "color": "^4.2.3", 26 | "colorthief": "^2.4.0", 27 | "dayjs": "^1.11.7", 28 | "element-plus": "^2.2.28", 29 | "lodash": "^4.17.21", 30 | "vue": "^3.2.30", 31 | "vue-i18n": "^9.2.2", 32 | "vue-router": "^4.0.3" 33 | }, 34 | "devDependencies": { 35 | "@antfu/eslint-config": "^2.6.1", 36 | "@types/color": "^3.0.3", 37 | "@types/lodash": "^4.14.186", 38 | "@vitejs/plugin-vue": "^4.0.0", 39 | "@vue/cli-plugin-router": "~5.0.0", 40 | "@vue/cli-plugin-typescript": "~5.0.0", 41 | "@vue/cli-service": "~5.0.0", 42 | "@vue/compiler-sfc": "^3.2.45", 43 | "@vueuse/shared": "^10.1.2", 44 | "@widget-js/cli": "^24.1.1-beta.70", 45 | "@widget-js/vite-plugin-widget": "^24.1.1-beta.71", 46 | "css-loader": "^6.7.2", 47 | "eslint": "8.48.0", 48 | "lint-staged": "^15.2.0", 49 | "prettier": "^2.8.4", 50 | "sass": "^1.56.0", 51 | "sass-loader": "^12.0.0", 52 | "simple-git": "^3.22.0", 53 | "simple-git-hooks": "^2.9.0", 54 | "style-loader": "^3.3.1", 55 | "tsconfig-paths-webpack-plugin": "^4.0.0", 56 | "typescript": "^5.2.2", 57 | "unocss": "^66.1.1", 58 | "unplugin-auto-import": "^0.11.5", 59 | "unplugin-vue-components": "^0.22.11", 60 | "vite": "^7.1.11", 61 | "vue-loader": "^16.8.3", 62 | "vue-tsc": "^1.0.11" 63 | }, 64 | "pnpm": { 65 | "peerDependencyRules": { 66 | "ignoreMissing": [ 67 | "react", 68 | "react-dom", 69 | "rollup", 70 | "@types/react" 71 | ] 72 | } 73 | }, 74 | "simple-git-hooks": { 75 | "pre-commit": "npx lint-staged" 76 | }, 77 | "lint-staged": { 78 | "*.{js,ts,tsx,vue,md}": [ 79 | "eslint --cache --fix" 80 | ] 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/widgets/weibo/WeiBoWidget.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 73 | 74 | 106 | -------------------------------------------------------------------------------- /src/widgets/zhihu/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/widgets/zhihu/ZhihuWidget.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 70 | 71 | 135 | -------------------------------------------------------------------------------- /src/widgets/bangumi/BangumiWidget.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 66 | 67 | 139 | -------------------------------------------------------------------------------- /src/widgets/bangumi/BangumiItem.vue: -------------------------------------------------------------------------------- 1 | 69 | 70 | 93 | 94 | 161 | -------------------------------------------------------------------------------- /src/widgets/bilibili-rcmd/BilibiliRcmdWidgetView.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 71 | 72 | 186 | -------------------------------------------------------------------------------- /src/widgets/douyin/DouyinWidget.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 99 | 100 | 140 | -------------------------------------------------------------------------------- /src/LandingPage.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 81 | 82 | 212 | -------------------------------------------------------------------------------- /public/widget.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cn.widgetjs.widgets.hotspot", 3 | "version": "1.8.0", 4 | "author": "Neo Fu", 5 | "homepage": "https://widgetjs.cn", 6 | "title": { 7 | "zh-CN": "全网热点组件" 8 | }, 9 | "description": { 10 | "zh-CN": "包含知乎、B站、抖音、微博等平台的热搜组件。" 11 | }, 12 | "entry": "index.html", 13 | "remoteEntry": "https://widgetjs.cn/hotspot", 14 | "remotePackage": "https://widgetjs.cn/hotspot/widget.json", 15 | "remote": { 16 | "entry": "https://widgetjs.cn/hotspot", 17 | "hash": true, 18 | "base": "/hotspot", 19 | "hostname": "widgetjs.cn" 20 | }, 21 | "zipUrl": "https://widgetjs.cn/hotspot/widget.zip", 22 | "hash": true, 23 | "url": "", 24 | "widgets": [ 25 | { 26 | "name": "cn.widgetjs.widgets.hotspot.tou_tiao", 27 | "title": { 28 | "zh-CN": "头条热榜" 29 | }, 30 | "description": { 31 | "zh-CN": "今日头条热度榜单" 32 | }, 33 | "keywords": [ 34 | "recommend" 35 | ], 36 | "security": false, 37 | "permissions": [], 38 | "lang": "zh-CN", 39 | "width": 4, 40 | "height": 4, 41 | "maxWidth": 6, 42 | "webviewTag": false, 43 | "maxHeight": 6, 44 | "minWidth": 4, 45 | "minHeight": 4, 46 | "movable": true, 47 | "singleton": false, 48 | "resizable": true, 49 | "path": "/widget/tou_tiao", 50 | "meta": {}, 51 | "backgroundThrottling": true, 52 | "previewImage": "/images/preview_toutiao.png", 53 | "categories": [ 54 | "news" 55 | ], 56 | "supportDeployMode": 17, 57 | "routes": [] 58 | }, 59 | { 60 | "name": "cn.widgetjs.widgets.hotspot.douyin", 61 | "title": { 62 | "zh-CN": "抖音热榜" 63 | }, 64 | "description": { 65 | "zh-CN": "抖音热榜" 66 | }, 67 | "keywords": [ 68 | "recommend" 69 | ], 70 | "security": false, 71 | "permissions": [], 72 | "lang": "zh-CN", 73 | "width": 4, 74 | "height": 3, 75 | "maxWidth": 6, 76 | "webviewTag": false, 77 | "maxHeight": 6, 78 | "minWidth": 4, 79 | "minHeight": 3, 80 | "movable": true, 81 | "singleton": false, 82 | "resizable": true, 83 | "path": "/widget/douyin", 84 | "meta": {}, 85 | "backgroundThrottling": true, 86 | "previewImage": "/images/preview_douyin.png", 87 | "categories": [ 88 | "news" 89 | ], 90 | "supportDeployMode": 17, 91 | "routes": [ 92 | { 93 | "url": "/widget/douyin", 94 | "name": "index" 95 | } 96 | ], 97 | "socialLinks": [ 98 | { 99 | "name": "github", 100 | "link": "https://github.com/widget-js/hotspot" 101 | } 102 | ] 103 | }, 104 | { 105 | "name": "cn.widgetjs.widgets.hotspot.cls_telegraph", 106 | "title": { 107 | "zh-CN": "财联社电报" 108 | }, 109 | "description": { 110 | "zh-CN": "每5分钟刷新一次" 111 | }, 112 | "keywords": [ 113 | "recommend" 114 | ], 115 | "security": false, 116 | "permissions": [], 117 | "lang": "zh-CN", 118 | "width": 4, 119 | "height": 4, 120 | "maxWidth": 6, 121 | "webviewTag": false, 122 | "maxHeight": 6, 123 | "minWidth": 4, 124 | "minHeight": 4, 125 | "movable": true, 126 | "singleton": false, 127 | "resizable": true, 128 | "path": "/widget/cls_telegraph", 129 | "meta": {}, 130 | "backgroundThrottling": true, 131 | "previewImage": "/images/preview_cls_telegraph.png", 132 | "categories": [ 133 | "finance", 134 | "news" 135 | ], 136 | "supportDeployMode": 17, 137 | "routes": [] 138 | }, 139 | { 140 | "name": "cn.widgetjs.widgets.hotspot.bilibili_rcmd", 141 | "title": { 142 | "zh-CN": "B站推荐", 143 | "en-US": "Bilibili Recommend" 144 | }, 145 | "description": { 146 | "zh-CN": "实时获取B站推荐视频,发现更多精彩内容", 147 | "en-US": "Discover more exciting content" 148 | }, 149 | "keywords": [ 150 | "recommend" 151 | ], 152 | "security": false, 153 | "permissions": [], 154 | "lang": "zh-CN", 155 | "width": 4, 156 | "height": 4, 157 | "maxWidth": 6, 158 | "webviewTag": false, 159 | "maxHeight": 6, 160 | "minWidth": 4, 161 | "minHeight": 4, 162 | "movable": true, 163 | "singleton": false, 164 | "resizable": true, 165 | "path": "/widget/bilibili_rcmd", 166 | "meta": {}, 167 | "backgroundThrottling": true, 168 | "previewImage": "/images/preview_bilibili_rcmd.png", 169 | "categories": [ 170 | "news" 171 | ], 172 | "supportDeployMode": 17, 173 | "routes": [], 174 | "socialLinks": [ 175 | { 176 | "name": "github", 177 | "link": "https://github.com/widget-js/hotspot" 178 | } 179 | ] 180 | }, 181 | { 182 | "name": "cn.widgetjs.widgets.hotspot.bilibili", 183 | "title": { 184 | "zh-CN": "bilibili热搜" 185 | }, 186 | "description": { 187 | "zh-CN": "看看年轻人在B站搜什么" 188 | }, 189 | "keywords": [ 190 | "recommend" 191 | ], 192 | "security": false, 193 | "permissions": [], 194 | "lang": "zh-CN", 195 | "width": 4, 196 | "height": 3, 197 | "maxWidth": 6, 198 | "webviewTag": false, 199 | "maxHeight": 6, 200 | "minWidth": 4, 201 | "minHeight": 3, 202 | "movable": true, 203 | "singleton": false, 204 | "resizable": true, 205 | "path": "/widget/bilibili", 206 | "meta": {}, 207 | "backgroundThrottling": true, 208 | "previewImage": "/images/bilibili_hot_search.png", 209 | "categories": [ 210 | "news" 211 | ], 212 | "supportDeployMode": 17, 213 | "routes": [ 214 | { 215 | "url": "/widget/bilibili", 216 | "name": "index" 217 | } 218 | ], 219 | "socialLinks": [ 220 | { 221 | "name": "github", 222 | "link": "https://github.com/widget-js/hotspot" 223 | } 224 | ] 225 | }, 226 | { 227 | "name": "cn.widgetjs.widgets.hotspot.bangumi", 228 | "title": { 229 | "zh-CN": "B站新番时间表" 230 | }, 231 | "description": { 232 | "zh-CN": "追番小助手" 233 | }, 234 | "keywords": [ 235 | "recommend" 236 | ], 237 | "security": false, 238 | "permissions": [], 239 | "lang": "zh-CN", 240 | "width": 4, 241 | "height": 4, 242 | "maxWidth": 6, 243 | "webviewTag": false, 244 | "maxHeight": 4, 245 | "minWidth": 4, 246 | "minHeight": 4, 247 | "movable": true, 248 | "singleton": false, 249 | "resizable": true, 250 | "path": "/widget/bangumi", 251 | "meta": {}, 252 | "backgroundThrottling": true, 253 | "previewImage": "/images/preview_bangumi.png", 254 | "categories": [ 255 | "news" 256 | ], 257 | "supportDeployMode": 17, 258 | "routes": [ 259 | { 260 | "url": "/widget/bangumi", 261 | "name": "index" 262 | } 263 | ], 264 | "socialLinks": [ 265 | { 266 | "name": "github", 267 | "link": "https://github.com/widget-js/hotspot" 268 | } 269 | ] 270 | } 271 | ], 272 | "pages": [] 273 | } -------------------------------------------------------------------------------- /public/cn.widgetjs.widgets.hotspot.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cn.widgetjs.widgets.hotspot", 3 | "version": "1.8.0", 4 | "author": "Neo Fu", 5 | "homepage": "https://widgetjs.cn", 6 | "title": { 7 | "zh-CN": "全网热点组件" 8 | }, 9 | "description": { 10 | "zh-CN": "包含知乎、B站、抖音、微博等平台的热搜组件。" 11 | }, 12 | "entry": "index.html", 13 | "remoteEntry": "https://widgetjs.cn/hotspot", 14 | "remotePackage": "https://widgetjs.cn/hotspot/widget.json", 15 | "remote": { 16 | "entry": "https://widgetjs.cn/hotspot", 17 | "hash": true, 18 | "base": "/hotspot", 19 | "hostname": "widgetjs.cn" 20 | }, 21 | "zipUrl": "https://widgetjs.cn/hotspot/widget.zip", 22 | "hash": true, 23 | "url": "", 24 | "widgets": [ 25 | { 26 | "name": "cn.widgetjs.widgets.hotspot.tou_tiao", 27 | "title": { 28 | "zh-CN": "头条热榜" 29 | }, 30 | "description": { 31 | "zh-CN": "今日头条热度榜单" 32 | }, 33 | "keywords": [ 34 | "recommend" 35 | ], 36 | "security": false, 37 | "permissions": [], 38 | "lang": "zh-CN", 39 | "width": 4, 40 | "height": 4, 41 | "maxWidth": 6, 42 | "webviewTag": false, 43 | "maxHeight": 6, 44 | "minWidth": 4, 45 | "minHeight": 4, 46 | "movable": true, 47 | "singleton": false, 48 | "resizable": true, 49 | "path": "/widget/tou_tiao", 50 | "meta": {}, 51 | "backgroundThrottling": true, 52 | "previewImage": "/images/preview_toutiao.png", 53 | "categories": [ 54 | "news" 55 | ], 56 | "supportDeployMode": 17, 57 | "routes": [] 58 | }, 59 | { 60 | "name": "cn.widgetjs.widgets.hotspot.douyin", 61 | "title": { 62 | "zh-CN": "抖音热榜" 63 | }, 64 | "description": { 65 | "zh-CN": "抖音热榜" 66 | }, 67 | "keywords": [ 68 | "recommend" 69 | ], 70 | "security": false, 71 | "permissions": [], 72 | "lang": "zh-CN", 73 | "width": 4, 74 | "height": 3, 75 | "maxWidth": 6, 76 | "webviewTag": false, 77 | "maxHeight": 6, 78 | "minWidth": 4, 79 | "minHeight": 3, 80 | "movable": true, 81 | "singleton": false, 82 | "resizable": true, 83 | "path": "/widget/douyin", 84 | "meta": {}, 85 | "backgroundThrottling": true, 86 | "previewImage": "/images/preview_douyin.png", 87 | "categories": [ 88 | "news" 89 | ], 90 | "supportDeployMode": 17, 91 | "routes": [ 92 | { 93 | "url": "/widget/douyin", 94 | "name": "index" 95 | } 96 | ], 97 | "socialLinks": [ 98 | { 99 | "name": "github", 100 | "link": "https://github.com/widget-js/hotspot" 101 | } 102 | ] 103 | }, 104 | { 105 | "name": "cn.widgetjs.widgets.hotspot.cls_telegraph", 106 | "title": { 107 | "zh-CN": "财联社电报" 108 | }, 109 | "description": { 110 | "zh-CN": "每5分钟刷新一次" 111 | }, 112 | "keywords": [ 113 | "recommend" 114 | ], 115 | "security": false, 116 | "permissions": [], 117 | "lang": "zh-CN", 118 | "width": 4, 119 | "height": 4, 120 | "maxWidth": 6, 121 | "webviewTag": false, 122 | "maxHeight": 6, 123 | "minWidth": 4, 124 | "minHeight": 4, 125 | "movable": true, 126 | "singleton": false, 127 | "resizable": true, 128 | "path": "/widget/cls_telegraph", 129 | "meta": {}, 130 | "backgroundThrottling": true, 131 | "previewImage": "/images/preview_cls_telegraph.png", 132 | "categories": [ 133 | "finance", 134 | "news" 135 | ], 136 | "supportDeployMode": 17, 137 | "routes": [] 138 | }, 139 | { 140 | "name": "cn.widgetjs.widgets.hotspot.bilibili_rcmd", 141 | "title": { 142 | "zh-CN": "B站推荐", 143 | "en-US": "Bilibili Recommend" 144 | }, 145 | "description": { 146 | "zh-CN": "实时获取B站推荐视频,发现更多精彩内容", 147 | "en-US": "Discover more exciting content" 148 | }, 149 | "keywords": [ 150 | "recommend" 151 | ], 152 | "security": false, 153 | "permissions": [], 154 | "lang": "zh-CN", 155 | "width": 4, 156 | "height": 4, 157 | "maxWidth": 6, 158 | "webviewTag": false, 159 | "maxHeight": 6, 160 | "minWidth": 4, 161 | "minHeight": 4, 162 | "movable": true, 163 | "singleton": false, 164 | "resizable": true, 165 | "path": "/widget/bilibili_rcmd", 166 | "meta": {}, 167 | "backgroundThrottling": true, 168 | "previewImage": "/images/preview_bilibili_rcmd.png", 169 | "categories": [ 170 | "news" 171 | ], 172 | "supportDeployMode": 17, 173 | "routes": [], 174 | "socialLinks": [ 175 | { 176 | "name": "github", 177 | "link": "https://github.com/widget-js/hotspot" 178 | } 179 | ] 180 | }, 181 | { 182 | "name": "cn.widgetjs.widgets.hotspot.bilibili", 183 | "title": { 184 | "zh-CN": "bilibili热搜" 185 | }, 186 | "description": { 187 | "zh-CN": "看看年轻人在B站搜什么" 188 | }, 189 | "keywords": [ 190 | "recommend" 191 | ], 192 | "security": false, 193 | "permissions": [], 194 | "lang": "zh-CN", 195 | "width": 4, 196 | "height": 3, 197 | "maxWidth": 6, 198 | "webviewTag": false, 199 | "maxHeight": 6, 200 | "minWidth": 4, 201 | "minHeight": 3, 202 | "movable": true, 203 | "singleton": false, 204 | "resizable": true, 205 | "path": "/widget/bilibili", 206 | "meta": {}, 207 | "backgroundThrottling": true, 208 | "previewImage": "/images/bilibili_hot_search.png", 209 | "categories": [ 210 | "news" 211 | ], 212 | "supportDeployMode": 17, 213 | "routes": [ 214 | { 215 | "url": "/widget/bilibili", 216 | "name": "index" 217 | } 218 | ], 219 | "socialLinks": [ 220 | { 221 | "name": "github", 222 | "link": "https://github.com/widget-js/hotspot" 223 | } 224 | ] 225 | }, 226 | { 227 | "name": "cn.widgetjs.widgets.hotspot.bangumi", 228 | "title": { 229 | "zh-CN": "B站新番时间表" 230 | }, 231 | "description": { 232 | "zh-CN": "追番小助手" 233 | }, 234 | "keywords": [ 235 | "recommend" 236 | ], 237 | "security": false, 238 | "permissions": [], 239 | "lang": "zh-CN", 240 | "width": 4, 241 | "height": 4, 242 | "maxWidth": 6, 243 | "webviewTag": false, 244 | "maxHeight": 4, 245 | "minWidth": 4, 246 | "minHeight": 4, 247 | "movable": true, 248 | "singleton": false, 249 | "resizable": true, 250 | "path": "/widget/bangumi", 251 | "meta": {}, 252 | "backgroundThrottling": true, 253 | "previewImage": "/images/preview_bangumi.png", 254 | "categories": [ 255 | "news" 256 | ], 257 | "supportDeployMode": 17, 258 | "routes": [ 259 | { 260 | "url": "/widget/bangumi", 261 | "name": "index" 262 | } 263 | ], 264 | "socialLinks": [ 265 | { 266 | "name": "github", 267 | "link": "https://github.com/widget-js/hotspot" 268 | } 269 | ] 270 | } 271 | ], 272 | "pages": [] 273 | } -------------------------------------------------------------------------------- /.eslintcache: -------------------------------------------------------------------------------- 1 | [{"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\main.ts":"1","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\widget.package.ts":"2","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\LandingPage.vue":"3","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bangumi\\Bangumi.widget.ts":"4","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bangumi\\BangumiWidget.vue":"5","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili\\Bilibili.widget.ts":"6","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili\\BilibiliWidget.vue":"7","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\components\\HotspotBox.vue":"8","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\douyin\\Douyin.widget.ts":"9","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\douyin\\DouyinWidget.vue":"10","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\weibo\\WeiBo.widget.ts":"11","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\weibo\\WeiBoWidget.vue":"12","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\zhihu\\Zhihu.widget.ts":"13","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\zhihu\\ZhihuWidget.vue":"14","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\api\\BilibiliApi.ts":"15","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili-rcmd\\BilibiliRcmd.widget.ts":"16","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili-rcmd\\BilibiliRcmdWidgetRoutes.ts":"17","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili-rcmd\\BilibiliRcmdWidgetView.vue":"18","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\widget-router.ts":"19","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\components\\HotspotItem.vue":"20","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\douyin\\DouyinWidgetView.vue":"21","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widget.package.ts":"22","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\utils\\ClsUtils.ts":"23","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\cls-telegraph\\ClsTelegraph.widget.ts":"24","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\cls-telegraph\\ClsTelegraphWidgetRoutes.ts":"25","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\cls-telegraph\\ClsTelegraphWidgetView.vue":"26","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\uno.config.ts":"27","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\vite.config.ts":"28","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\tou-tiao\\TouTiao.widget.ts":"29","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\tou-tiao\\TouTiaoWidgetRoutes.ts":"30","C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\tou-tiao\\TouTiaoWidgetView.vue":"31"},{"size":353,"mtime":1746777023636,"results":"32","hashOfConfig":"33"},{"size":798,"mtime":1752994919842,"results":"34","hashOfConfig":"33"},{"size":5136,"mtime":1734860466716,"results":"35","hashOfConfig":"36"},{"size":938,"mtime":1734860638343,"results":"37","hashOfConfig":"38"},{"size":3513,"mtime":1734860466717,"results":"39","hashOfConfig":"36"},{"size":899,"mtime":1734860638337,"results":"40","hashOfConfig":"38"},{"size":2235,"mtime":1735965702766,"results":"41","hashOfConfig":"36"},{"size":1455,"mtime":1735965702769,"results":"42","hashOfConfig":"43"},{"size":865,"mtime":1734860638350,"results":"44","hashOfConfig":"38"},{"size":4706,"mtime":1746776050938,"results":"45","hashOfConfig":"46"},{"size":864,"mtime":1734860638358,"results":"47","hashOfConfig":"38"},{"size":2462,"mtime":1736999551882,"results":"48","hashOfConfig":"46"},{"size":978,"mtime":1746775666179,"results":"49","hashOfConfig":"33"},{"size":3142,"mtime":1736999406061,"results":"50","hashOfConfig":"46"},{"size":1640,"mtime":1735965644402,"results":"51","hashOfConfig":"38"},{"size":753,"mtime":1735965644403,"results":"52","hashOfConfig":"38"},{"size":485,"mtime":1735965644404,"results":"53","hashOfConfig":"38"},{"size":4278,"mtime":1735965664148,"results":"54","hashOfConfig":"43"},{"size":934,"mtime":1746792655990},{"size":1571,"mtime":1735965702771,"results":"55","hashOfConfig":"43"},{"size":247,"mtime":1735965702773,"results":"56","hashOfConfig":"43"},{"size":818,"mtime":1735965702765,"results":"57","hashOfConfig":"38"},{"size":126,"mtime":1746776015914},{"size":549,"mtime":1746777204650,"results":"58","hashOfConfig":"33"},{"size":389,"mtime":1746775739231},{"size":1741,"mtime":1746777154631,"results":"59","hashOfConfig":"46"},{"size":78,"mtime":1746776954525,"results":"60","hashOfConfig":"33"},{"size":803,"mtime":1746776986409,"results":"61","hashOfConfig":"33"},{"size":511,"mtime":1746794212543,"results":"62","hashOfConfig":"33"},{"size":342,"mtime":1746792970198,"results":"63","hashOfConfig":"33"},{"size":1852,"mtime":1746794277785,"results":"64","hashOfConfig":"46"},{"filePath":"65","messages":"66","suppressedMessages":"67","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xunfp6",{"filePath":"68","messages":"69","suppressedMessages":"70","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"71","messages":"72","suppressedMessages":"73","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xkkfc8",{"filePath":"74","messages":"75","suppressedMessages":"76","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1bwn0eu",{"filePath":"77","messages":"78","suppressedMessages":"79","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","suppressedMessages":"82","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","suppressedMessages":"85","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"86","messages":"87","suppressedMessages":"88","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"txpprc",{"filePath":"89","messages":"90","suppressedMessages":"91","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"92","messages":"93","suppressedMessages":"94","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"p3zbjh",{"filePath":"95","messages":"96","suppressedMessages":"97","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"98","messages":"99","suppressedMessages":"100","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"101","messages":"102","suppressedMessages":"103","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"104","messages":"105","suppressedMessages":"106","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"107","messages":"108","suppressedMessages":"109","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"110","messages":"111","suppressedMessages":"112","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"113","messages":"114","suppressedMessages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"116","messages":"117","suppressedMessages":"118","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"119","messages":"120","suppressedMessages":"121","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","suppressedMessages":"124","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"125","messages":"126","suppressedMessages":"127","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","suppressedMessages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"131","messages":"132","suppressedMessages":"133","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","suppressedMessages":"136","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"137","messages":"138","suppressedMessages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","suppressedMessages":"142","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"143","messages":"144","suppressedMessages":"145","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","suppressedMessages":"148","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\main.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\widget.package.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\LandingPage.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bangumi\\Bangumi.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bangumi\\BangumiWidget.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili\\Bilibili.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili\\BilibiliWidget.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\components\\HotspotBox.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\douyin\\Douyin.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\douyin\\DouyinWidget.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\weibo\\WeiBo.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\weibo\\WeiBoWidget.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\zhihu\\Zhihu.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\zhihu\\ZhihuWidget.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\api\\BilibiliApi.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili-rcmd\\BilibiliRcmd.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili-rcmd\\BilibiliRcmdWidgetRoutes.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\bilibili-rcmd\\BilibiliRcmdWidgetView.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\components\\HotspotItem.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\douyin\\DouyinWidgetView.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widget.package.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\cls-telegraph\\ClsTelegraph.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\cls-telegraph\\ClsTelegraphWidgetView.vue",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\uno.config.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\vite.config.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\tou-tiao\\TouTiao.widget.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\tou-tiao\\TouTiaoWidgetRoutes.ts",[],[],"C:\\Users\\rtuge\\Desktop\\workspace\\widgetjs\\packages\\hotspot\\src\\widgets\\tou-tiao\\TouTiaoWidgetView.vue",[],[]] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------