Hi!
I'm looking for a TM script that can change your pen setting to whichever pen you used last (or specify a pen name in the code for the script to auto-select on every board you visit). (you need an account to see links) does that, but only for the custom pens. If you use a real NB pen, it will set the setting back to the first custom pen from the script.
Is there any way to do this easily? I don't understand enough code to try and pull it from his script to work with actual pens.
It's the same code for each pen the user has, however many they have. Just the value '#' at the end goes up.
I included a second pen's code so you could see exactly what the difference is!
Hope that was what you were looking for.
If not I'm happy to send you a pen so it's easier for you to work with. Just let me know!
It's the same code for each pen the user has, however many they have. Just the value '#' at the end goes up.
I included a second pen's code so you could see exactly what the difference is!
Hope that was what you were looking for.
If not I'm happy to send you a pen so it's easier for you to work with. Just let me know!
Thank you so much!
I added that code to my page within the same script, its possible it wont work on the original, try it and let me know if it does?
Code:
// ==UserScript==
// @(you need an account to see links) Neopets: Default Neoboard Pen
// @(you need an account to see links)space (you need an account to see links)
// @version 0.1
// @(you need an account to see links)cription Sets the last neoboard pen selected as the one selected by default
// @author Nyu (clraik)
// @(you need an account to see links)ch (you need an account to see links)
// @grant none
// ==/UserScript==
var pens_owned=3;//default counts as one! Change to your pen quantity.
/*
var r="<tr>"+
"<td align='center'colspan='2'><table align='center' cellpadding='10' cellspacing='0' border='0' style='border: 1px black solid'> <tr>"+
"<td align='center'><img src='http://images.neopets.com/neoboards/mall_sm_notebook.gif' height='16' width='16' border='0'><br>Default<br><input type='radio' name='select_pen' value='0' CHECKED></td>"+
"<td align='center' width='62'><img src='http://images.neopets.com/neoboards/mall_sm_thinpen_green.gif' height='16' width='16' border='0'><br>PENNAME1<br><input type='radio' name='select_pen' value='1'></td>"+
"<td align='center' width='62'><img src='http://images.neopets.com/neoboards/mall_sm_thinpen_green.gif' height='16' width='16' border='0'><br>PENNAME2<br><input type='radio' name='select_pen' value='2'></td>"+
"<tr>";
var htex=document.getElementsByTagName("form")[1].getElementsByTagName("table")[1].getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td")[0].getElementsByTagName("table")[0].getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td")[1].getElementsByTagName("td")[0];
var a = document.createElement ('a');
a.innerHTML = r;
htex.appendChild(a);
*/
var lastPen=0;
var loc=parseInt(localStorage.getItem("SelectedPen"));
if(!isNaN(loc)){
lastPen=loc;
}
$("[name='select_pen']")[lastPen].checked=true;
window.setInterval(function(){ changed(); }, 100);
function changed(){
for(var i=0;i<pens_owned;i++){
var m=$("[name='select_pen']")[i];
var me=m.outerHTML.toString();
if(m.checked==true){
var x=me.split("value");
var y=x[1].split('"');
var val=y[1];
localStorage.setItem("SelectedPen",val.toString());
}
}
}
I added that code to my page within the same script, its possible it wont work on the original, try it and let me know if it does?
Code:
// ==UserScript==
// @(you need an account to see links) Neopets: Default Neoboard Pen
// @(you need an account to see links)space (you need an account to see links)
// @version 0.1
// @(you need an account to see links)cription Sets the last neoboard pen selected as the one selected by default
// @author Nyu (clraik)
// @(you need an account to see links)ch (you need an account to see links)
// @grant none
// ==/UserScript==
var pens_owned=3;//default counts as one! Change to your pen quantity.
/*
var r="<tr>"+
"<td align='center'colspan='2'><table align='center' cellpadding='10' cellspacing='0' border='0' style='border: 1px black solid'> <tr>"+
"<td align='center'><img src='http://images.neopets.com/neoboards/mall_sm_notebook.gif' height='16' width='16' border='0'><br>Default<br><input type='radio' name='select_pen' value='0' CHECKED></td>"+
"<td align='center' width='62'><img src='http://images.neopets.com/neoboards/mall_sm_thinpen_green.gif' height='16' width='16' border='0'><br>PENNAME1<br><input type='radio' name='select_pen' value='1'></td>"+
"<td align='center' width='62'><img src='http://images.neopets.com/neoboards/mall_sm_thinpen_green.gif' height='16' width='16' border='0'><br>PENNAME2<br><input type='radio' name='select_pen' value='2'></td>"+
"<tr>";
var htex=document.getElementsByTagName("form")[1].getElementsByTagName("table")[1].getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td")[0].getElementsByTagName("table")[0].getElementsByTagName("tbody")[0].getElementsByTagName("tr")[0].getElementsByTagName("td")[1].getElementsByTagName("td")[0];
var a = document.createElement ('a');
a.innerHTML = r;
htex.appendChild(a);
*/
var lastPen=0;
var loc=parseInt(localStorage.getItem("SelectedPen"));
if(!isNaN(loc)){
lastPen=loc;
}
$("[name='select_pen']")[lastPen].checked=true;
window.setInterval(function(){ changed(); }, 100);
function changed(){
for(var i=0;i<pens_owned;i++){
var m=$("[name='select_pen']")[i];
var me=m.outerHTML.toString();
if(m.checked==true){
var x=me.split("value");
var y=x[1].split('"');
var val=y[1];
localStorage.setItem("SelectedPen",val.toString());
}
}
}
Works like an absolute charm. You are amazing!!
By the original, do you mean w35l3y's? I don't actually use his pen script because it changes your account avatar manually and looks suspicious, but I just wanted to use that to reference the type of code that might be needed. ^_^
It still works with his script enabled though, and will still select the last used pen (including real pens) when you post!
By the original, do you mean w35l3y's? I don't actually use his pen script because it changes your account avatar manually and looks suspicious, but I just wanted to use that to reference the type of code that might be needed. ^_^
It still works with his script enabled though, and will still select the last used pen (including real pens) when you post!
Nah, i meant the legit one, when you buy neoboard pens and it appears with no scripts, i have w35l3y's installed on firefox too, didnt try it because his script already does that but im glad it works c: