zfowed

Results 7 comments of zfowed

for循环的 ```javascript function getIndex (arr) { let index = -1 for (let i = 0; i < arr.length; i++) { if (arr[i] > 0 && (index < 0 || arr[i]...

```javascript Object.prototype.map = function (iteratee) { const result = {} for (const key of Object.keys(source)) { result[key] = iteratee.call(this, source[key], key) } return result } ```

实现 ```javascript /** 将路径分解成数组 */ function pathToArray (path) { return Array.isArray(path) ? path : path.replace(/\[/g, '.').replace(/\]/g, '').split('.') } /** 设置 object对象中对应 `path` 属性路径上的值 */ function set (object, path, value) {...

```javascript function handle (string) { let max = 0 let result = {} const chars = string.match(/(.)\1*/g) || [] // [ 'a', 'b', 'c', 'aa', 'k', 'j', 'bb' ] for...

### 用 cookie 模拟 localStorage > 参考 [https://developer.mozilla.org/zh-CN/docs/Web/API/Window/localStorage](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/localStorage) ```javascript if (!window.localStorage) { window.localStorage = { getItem: function (sKey) { if (!sKey || !this.hasOwnProperty(sKey)) { return null; } return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"...

> 单独做个游戏列表,然后可选将游戏pin到左栏怎么样? 格局打开点不要限制只做存档,搞个游戏库管理工具不香嘛😀,可以参考其他管理游戏的界面: ![image](https://github.com/mcthesw/game-save-manager/assets/23629388/0fd8a578-facc-4d03-abc6-eae3d286e38e) 还有希望可以像steam一样,启动/退出游戏的时候自动加载/备份存档一次😊

> @zfowed 如果说做“游戏库管理”的话,除了存档还有什么需要管理呢?游戏设置?watt toolkit我以前用过,是个不错的工具 启动/退出游戏的时候自动备份存档这个功能可以加入到未来的特性列表中,不过开发细节我目前还没什么头绪 这是我以前的想法,奈何实力不允许未能实现😂 ![aaa](https://github.com/mcthesw/game-save-manager/assets/23629388/29b3c33f-e8e9-40ac-beac-2b20201ed99f)