|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
May 14 2016, 21:29
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
Welcome back in script business (IMG:[ invalid] style_emoticons/default/happy.gif) QUOTE @all: How is the demand for CC to support multiple personas? That's very clever idea, but this is really code chaos... o_o We should rename this question in the way - how many people we have here that constantly using different personas and switch them back and forward? I think not so much. Making a script that will suit only ~10% of players is not worthy. They can, actually just copy your script and do different setting in each iteration and then switch them on and off to suit their need. My imho - better to stay it "as is"
|
|
|
|
|
|
|
|
|
May 15 2016, 11:46
|
Fudo Masamune
Group: Gold Star Club
Posts: 1,636
Joined: 2-February 10
|
Assuming I want's to replace the sound on riddlemasterplus with another music. and the music is on local file. (I have one on the net but in case the server is down) I put CODE // @grant GM_getResourceURL // @resource mew file:///Y:/song.ogg
var x = new Audio(GM_getResourceURL('mew')); x.play(); it doesn't work. tried to check if x variable is exist and whether it's correct using the console.log(x); and it shows. so... any ideas? Iron 44 tampermonkey 4.0.25 btw.
|
|
|
|
|
|
May 15 2016, 11:57
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
QUOTE(Fudo Masamune @ May 15 2016, 09:46) so... any ideas? Iron 44 tampermonkey 4.0.25 btw. Completely random guess: It shows "data:application;base64". When I use sounds, I use (very hacky) localStorage instead, and use a1.setAttribute('src', 'data:audio/ogg;base64,' + localStorage.a1); and it works. Note: "data:audio/ogg;", not "data:application;" This post has been edited by Superlatanium: May 15 2016, 11:58
|
|
|
|
|
|
May 15 2016, 15:09
|
Fudo Masamune
Group: Gold Star Club
Posts: 1,636
Joined: 2-February 10
|
oh, that's right, it works... It feels so shady tough :/ thought, how to put it on localStorage better? CODE // @grant GM_getResourceURL // @resource mew file:///Y:/mewmew.ogg // ==/UserScript==
var x = new Audio(GM_getResourceURL('mew')); var xmin = x.src; var xmin2 = xmin.search('base64')+7; var xmin3 = xmin.slice(xmin2); localStorage.setItem('lagux', xmin3); x.setAttribute('src', 'data:audio/ogg;base64,' + localStorage.lagux);
x.play();
This post has been edited by Fudo Masamune: May 15 2016, 15:14
|
|
|
|
|
|
May 17 2016, 00:22
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
QUOTE(Fudo Masamune @ May 15 2016, 13:09) oh, that's right, it works... It feels so shady tough :/ thought, how to put it on localStorage better? Oh... I only use localStorage (and -> sessionStorage) because doesn't require a GM_ special function, and for better performance (no disk read required after the localStorage has been put into sessionStorage). Just an example of what I had been doing. In your case, using GM_, I think you could probably use a string method and operate on the x.src directly to turn the first instance of "data:application;" into "data:audio/ogg;" and then try "x.play()". (btw, something like string.replace will very likely be a lot easier to use than .search and .slice in this situation and most others. it would still work on the .src, right?)
|
|
|
|
|
|
May 17 2016, 02:11
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
SmartSearch 1.2.3
SmartSearch_1.2.3.user.js.txt ( 31.82k )
Number of downloads: 2628You can now filter by equipment EID. 0.82 was released very close to EID 67.18 million, so that's the default value. (Set Lowest EID to 0 to never filter out any) You can also now filter by thread title. "Include" means the thread title must include that word or phrase, or it will be hidden. "Exclude" means the opposite, of course. Most often the phrase you want is "auction", when searching within WTS. - Exclude auctions in order to find equipment you have a decent chance of being able to buy from a shop
- Include auctions in order to gauge the general market price of a (moderately high-tier) equipment type
You can now see the entire thread title when hovering the mouse over the title text. Made a number of other small tweaks and fixes.
|
|
|
|
|
|
May 17 2016, 07:15
|
Fudo Masamune
Group: Gold Star Club
Posts: 1,636
Joined: 2-February 10
|
QUOTE(Superlatanium @ May 17 2016, 05:22) Oh... I only use localStorage (and -> sessionStorage) because doesn't require a GM_ special function, and for better performance (no disk read required after the localStorage has been put into sessionStorage). Just an example of what I had been doing.
In your case, using GM_, I think you could probably use a string method and operate on the x.src directly to turn the first instance of "data:application;" into "data:audio/ogg;" and then try "x.play()".
(btw, something like string.replace will very likely be a lot easier to use than .search and .slice in this situation and most others. it would still work on the .src, right?)
oh yeah, that works (IMG:[ invalid] style_emoticons/default/biggrin.gif) I should stop being lazy to look for method reference... thanks anyway
|
|
|
|
|
|
May 17 2016, 10:32
|
Usagi =
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
|
QUOTE(Superlatanium @ May 17 2016, 08:11) SmartSearch 1.2.3
Say, do you have any plans to make it so that it doesn't require tampermonkey? (IMG:[ invalid] style_emoticons/default/tongue.gif)
|
|
|
May 17 2016, 10:53
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
QUOTE(LOL50015 @ May 17 2016, 08:32) Say, do you have any plans to make it so that it doesn't require tampermonkey? (IMG:[ invalid] style_emoticons/default/tongue.gif) What browser/script manager do you wish to be able to run it on that it can't run on currently? It worked on tampermonkey the couple times I tested it, and has always been working fine on Greasemonkey. It doesn't require any GM_ special functions, but it does require the ability to use IndexedDB. This post has been edited by Superlatanium: May 17 2016, 10:56
|
|
|
|
|
|
May 17 2016, 11:07
|
Usagi =
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
|
QUOTE(Superlatanium @ May 17 2016, 16:53) What browser/script manager do you wish to be able to run it on that it can't run on currently?
It worked on tampermonkey the couple times I tested it, and has always been working fine on Greasemonkey.
It doesn't require any GM_ special functions, but it does require the ability to use IndexedDB.
Well, I'm using chromium 48 which have native userscript support but when I try to run it nothing happens, the search bar doesn't show. There weren't any errors in the console, but when I copy the whole script script minus the return statement in the beginning and try to run it in the console, it gives off a left-hand side assignment error at line 297. It works perfectly when I run it with tampermonkey though. Edit: I removed: [tr.appendChild(w.document.createElement('td')).textContent, warn1] = ago(thread.dateSaved); [tr.appendChild(w.document.createElement('td')).textContent, warn2] = ago(post.lastEdited); and it seems to be working! Edit 2: and naturally the "posts edited" and "thread saved" column are empty when I did that. This post has been edited by LOL50015: May 17 2016, 11:22
|
|
|
|
|
|
May 17 2016, 11:37
|
Superlatanium
Group: Gold Star Club
Posts: 7,575
Joined: 27-November 13
|
QUOTE(LOL50015 @ May 17 2016, 09:07) Well, I'm using chromium 48 which have native userscript support but when I try to run it nothing happens, the search bar doesn't show. There weren't any errors in the console, but when I copy the whole script script minus the return statement in the beginning and try to run it in the console, it gives off a left-hand side assignment error at line 297. I see, so the issue is that Chromium, unlike Chrome and Firefox, does not support ES6 Javascript destructuring assignment for some reason. I have a guess that Chromium 49 might support it though. Maybe you can try that, if it doesn't work I can fix the code, it's very simple.
|
|
|
|
|
|
May 17 2016, 12:57
|
FabulousCupcake
Group: Gold Star Club
Posts: 490
Joined: 15-April 14
|
QUOTE(Superlatanium @ May 17 2016, 11:37) I see, so the issue is that Chromium, unlike Chrome and Firefox, does not support ES6 Javascript destructuring assignment for some reason. I have a guess that Chromium 49 might support it though.
Maybe you can try that, if it doesn't work I can fix the code, it's very simple.
Works on Chromium 50; with Tampermonkey though.
|
|
|
May 17 2016, 13:23
|
Usagi =
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
|
QUOTE(Superlatanium @ May 17 2016, 17:37) I see, so the issue is that Chromium, unlike Chrome and Firefox, does not support ES6 Javascript destructuring assignment for some reason. I have a guess that Chromium 49 might support it though.
Maybe you can try that, if it doesn't work I can fix the code, it's very simple.
Yeah, I checked and it does seem only chromium 49 and above support it. Thanks but I'll manage.
|
|
|
May 18 2016, 23:31
|
幻猫儿
Group: Gold Star Club
Posts: 7,591
Joined: 4-December 15
|
I downloaded equip comparison from here, pasted it into my tampermonkey but when I C an item, opened the popup and hit Y nothing happens except a "EC Loading" like the image below.
|
|
|
May 18 2016, 23:36
|
chumassu
Group: Members
Posts: 375
Joined: 19-February 12
|
QUOTE(Sweetness Overload @ May 18 2016, 18:31) I downloaded equip comparison from here, pasted it into my tampermonkey but when I C an item, opened the popup and hit Y nothing happens except a "EC Loading" like the image below. go to your equipment page and then it'll load your equips and you can start comparing gear, since some of the hotkeys are used to compare your equips with the item selected. This post has been edited by chumassu: May 18 2016, 23:37
|
|
|
May 18 2016, 23:39
|
幻猫儿
Group: Gold Star Club
Posts: 7,591
Joined: 4-December 15
|
QUOTE(chumassu @ May 18 2016, 23:36) go to your equipment page and then it'll load your equips and you can start comparing gear, since some of the hotkeys are used to compare your equips with the item selected.
Still don't get what I'm supposed to do (and it still doesn't work) (IMG:[ invalid] style_emoticons/default/sad.gif)
|
|
|
|
|
|
May 18 2016, 23:41
|
f4tal
Group: Members
Posts: 2,662
Joined: 10-January 13
|
QUOTE I downloaded equip comparison from here, pasted it into my tampermonkey but when I C an item, opened the popup and hit Y nothing happens except a "EC Loading" like the image below. Do you use custom font in settings (character -> settings -> select custom font )or default one? This script (and many more) require custom font to work properly. Try this settings for custom font: default | 8 | blank | blank | -2 If still will not work, try this steps: Troubleshooting If for some reasons scripts are not working for you try to do next: - Switch from default font engine to custom one. Seriously, this can help. You can find examples of custom fonts in THIS THREAD;
- If you are using firefox, try put link "about:config" into adressbar and set "gfx.direct2d.disabled" setting to "true";
- If you using some addons to remove custom javascript on sites (like NoScript), try to turn them off, or add HentaiVerse in exceptions;
- Check that popup is not restricted in your browser;
- Revisit EVERY "non-battle" pages in HentaiVerse (Character, Bazaar, Arena, Inventory, Equipment, e.t.c.). Yes, EVERY page like this. Some scripts require do this to collect data for future work;
- Rearrange WHERE and WHEN scripts located (their order and placement)
- Open script and try to add this line "//@match http://*.hentaiverse.org/*" into "==UserScript=="-block;
- Try to use different browser. Scripts developed in past years are adapted for work in chrome/iron and firefox in same way, but older scripts may require to use special browser;
- Try to use different build of script, because HentaiVerse is patched in past years and some versions of same scripts may not working now.
This post has been edited by f4tal: May 18 2016, 23:45
|
|
|
|
|
|
May 18 2016, 23:46
|
幻猫儿
Group: Gold Star Club
Posts: 7,591
Joined: 4-December 15
|
QUOTE(f4tal @ May 18 2016, 23:41) Do you use custom font in settings (character -> settings -> select custom font )or default one? This script (and many more) require custom font to work properly. Try this settings for custom font: default | 8 | blank | blank | -2
[/list]
This one really worked. Thanks f4tal you are the best (IMG:[ invalid] style_emoticons/default/biggrin.gif)
|
|
|
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|